s{(?mx: # Explicitly set /mx for this scope. This puts the modifiers right + up where they are being used instead of at the end of the regex. ^\[$ ((?s:.*?)) # Non-greedy match of multiple lines ^\]$ )}{ my $tmp = $1; $tmp =~ s{^([^\n]+)$}{<li>$1</li>}mg; # Added /m and fixed closing + bracket. Preferred [^\n] to . for explictness. "<ul>$tmp</ul>" }eg;
In reply to Re: automagic-HTML regex
by diotalevi
in thread automagic-HTML regex
by Cody Pendant
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |