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
You can try something like this :
import re regex = re.compile("f\(\s*([^,]+)\s*,\s*([^,]+)\s*\)") with open("my_file.txt") as f: for line in f: result = regex.search(line)