corfuitl has asked for the wisdom of the Perl Monks concerning the following question:
Dear Perlmonks
Applying the following code
while ($_ =~ /({\d+})/ || $_ =~ /({\w+>)/ || $_ =~ /(<\w+})/){ print "$1\n"; }
to this text
This is <i} a test {i> sentence <i}I get
{i> <i} <i}Is there any way to get them according to their occurrence? So,
<i} {i> <i}Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Matching patterns with or
by Eily (Monsignor) on Jun 19, 2018 at 16:34 UTC | |
by corfuitl (Sexton) on Jun 19, 2018 at 16:57 UTC | |
|
Re: Matching patterns with or
by AnomalousMonk (Archbishop) on Jun 19, 2018 at 18:32 UTC |