It would have been a good idea to post your script or a relevant part of it here so that we might see where to fit it in. Now you have to see for yourself how this might fit in with your code
my $ennumerate=0; ... #you probably have a loop like this in your script? while ($line=<$fh>) { #insert this into the loop: if ($ennumerate==1) { if ($line=~/^#(.*)/) { print "\\item $1\n"; } else { $ennumerate=0; print "\\end{enumerate}\n"; } else { if ($line=~/^#(.*)/) { print "\\begin{enumerate}\n"; print "\\item $1"; $ennumerate=1; } } ... }
In reply to Re: RegEx for parsing wiki enumeration
by jethro
in thread RegEx for parsing wiki enumeration
by raymontag
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |