in reply to Re^4: A NOT in regular expressions (why [^%>]?)
in thread A NOT in regular expressions
Um, no.
$s = '1 <% xxx%%> 2 <%%> 3 <%>%> 4 <% >% %> 5 <%%%% xxx %%%%> 6 '; $s =~ s/<% (?> [^%]+ | %+ [^>]+ )* %>/!REPLACED!/xg; print $s; 1 !REPLACED!%> 4 <% >% %> 5 <%%%% xxx %%%%> 6
|
|---|