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
use import re, then re.compile() with your pattern as an argument, and use the resulting object's match attribute on each line. something like this..
import re
re.compile()
match
import re pat = re.compile(r'f\(\s*([^,]+)\s*,\s*([^,]+)\s*\)') for line in file: # use pat.match, pat.search .. etc