Here is my regexp: f\\(\\s*([^,]+)\\s*,\\s*([^,]+)\\s*\\)
f\\(\\s*([^,]+)\\s*,\\s*([^,]+)\\s*\\)
I\'d have to apply this on a file, line by line. The line by line is OK, simple reading from
import re with open('file.txt') as f: for line in f: match = re.search('f\(\s*([^,]+)\s*,\s*([^,]+)\s*\)', line)
Note that Python automatically compiles and caches the regex, so a separate compile step is not required in this case.