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
The following expression returns a list; every entry of that list contains all matches of your regexp in the respective line.
>>> import re >>> [re.findall(r'f\(\s*([^,]+)\s*,\s*([^,]+)\s*\)',line) for line in open('file.txt')]