in reply to Regex question - capturing next char
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 ☆☆☆☆ :)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Regex question - capturing next char
by perluser4102 (Initiate) on Oct 10, 2014 at 06:11 UTC | |
by jonadab (Parson) on Oct 10, 2014 at 10:25 UTC | |
by QM (Parson) on Oct 10, 2014 at 13:43 UTC | |
by AnomalousMonk (Archbishop) on Oct 10, 2014 at 15:03 UTC |