Actually I don't know any more what your real goal is, so no recommendation other than
maybe try to show us better input and desired output.DB<114> $in_str = 'aa<c><d>r'; => "aa<c><d>r" DB<115> if ($in_str =~ /aa((<[^>]*>)*)$/) {print "$1"} => "" DB<116> $in_str = 'aa<c><d>'; => "aa<c><d>" DB<117> if ($in_str =~ /aa((<[^>]*>)*)$/) {print "$1"} => 1 <c><d>
Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
In reply to Re: Regex question - capturing next char
by LanX
in thread Regex question - capturing next char
by perluser4102
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |