Struggling with Python Regex for a very specific array
Question: I'm trying to make a regex method (if you can find an easier method, please
tell)

For example: I need the lines that are marked with "!" at the end

    
    
    [ExpertSingle]
    {
    192 = N 0 0
    384 = N 0 0
    576 = N 0 0
    768 = N 0 0
    960 = N 0 0
    }
    

**Edit** : replaced with actual data


Answer: You could just find the lines that with one or more numbers

    
    
    import re
    inputStr = """[ExpertSingle]
    {
    192 = N 0 0
    270 = N 1 0
    270 = N 2 0
    360 = N 0 0
    }"""
    
    goodLines = re.findall(r"\d+.+", inputStr)
    print(goodLines)
    

This outputs: `['192 = N 0 0', '270 = N 1 0', '270 = N 2 0', '360 = N 0 0']`

If you wanted to be ultra strict and only find words in the format of some
digits, a space, an equals, a space, a letter, a space, a digit, a space, then
another digit you could use

    
    
    goodLines = re.findall(r"\d+\s=\s\w\s\d\s\d", inputStr)
    

