I am trying to learn python but don't quite understand the syntax. Which is equivalent:
my $string='this one this that this here '; while($string=~/this\s+(.*?)\s+/g){ print $1."\n"; }
Fingerprints:
one that here
Try the re module. I think this is equivalent, compared to some side effects on string :
re
string
import re string = "this one this that this here " for match in re.finditer(r"this\s+(.*?)\s+", string): print match.group(1)