Just another Perl shrine | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I have some data files that were created without newlines that need to be fixed.
The files contain a bunch of records with an xml file name at the end. They look like... somedata file.xmlsomedata file.xmlsomedatafile.xml .... what I want them to be is ... somedata file.xml somedata file.xml somedata file.xml ... So , i thought I could use a piecewize regex like so... The problem is I cannot figure out how to make the regex non-greedy. My capturing portion matches the full string, all the way to the last xml file. How to I change the regex to be non-greedy and match up to the first xml file? In reply to non-greedy piecewise matching by mifflin
|
|