You want a parser, not a regex. But I am in a weird mood ...
my $test = "<<a> a> a <a>"; for ($test) { my $count = 0; s{(.)}{ $count++ if $1 eq '<'; $count-- if $1 eq '>'; $count ? uc $1 : $1; }ge; } print $test;
print "Just another Perl ${\(trickster and hacker)},"
The Sidhekin proves Sidhe did it!
In reply to Re: I don't remember regex seeming this hard before
by Sidhekin
in thread I don't remember regex seeming this hard before
by danderson
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |