in reply to "Not containing something" in substitution
Not terribly efficient, but it appers to do what you want.$begin = '[xyz]'; $end = '[/xyz]'; $string = '[xyz]level 1.1 [xyz]level 2.1[/xyz] rest of 1.1 [/xyz]'; 1 while ($string =~ s@ \Q$begin\E ((?:(?!=\Q$end\E).)*) \Q$end\E @ "<table><tr><td>$1</td></tr></table>" @igex); print $string;
|
|---|