seems like you're trying to parse XML? why don't you try something like XML::Simple
or maybe this will work:(?<=... does a prematch, and (?=... does a postmatch.. and only changes the digit.while ($ts=~ s|(?<=<item name=\"DISPLAY_ORDER\"><value>)\d+(?=\<\/va +lue><\/item><item name=\"PARAGRAPH_TEXT\">)|$paranum|si ) { print "Set PNum: $paranum\n"; $paranum++; }
In reply to Re: Regex Problem
by Chady
in thread Regex Problem
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |