I use Python (pl / python, actually) to find successively a series of regular expression matches in a very large text object. It works great! Each match represents a different result, and each replacement will differ from the result, ultimately, based on a query inside the loop.
At the moment, I would be happy to replace every match in rx with any text, so that I understand how it works. Can someone give me a clear example of replacing matched text?
match.group (1) seems to correctly indicate consistent text; is this a way to do something?
plan3 = plpy.prepare("SELECT field1,field2 FROM sometable WHERE indexfield = $1", [ "text" ]) rx = re.finditer('LEFT[AZ,az,:]+RIGHT)', data)
source share