Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: Matching a regular expression group multiple times

by sundialsvc4 (Abbot)
on Aug 12, 2014 at 23:42 UTC ( #1097198=note: print w/ replies, xml ) Need Help??


in reply to Matching a regular expression group multiple times

As far as I know, there are (just) two issues at-bar here:

  1. If you want to match zero-or-more adjacent occurrences of a single string, in any particular place within the source, then you must use a quantifier such as + ... and the search should be “greedy.”
  2. If you need to match multiple times within the same string, the modifiers /gc should be used, within a loop that will then search through and exhaust the input string.

And, that’s it.


Comment on Re: Matching a regular expression group multiple times

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1097198]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (8)
As of 2014-10-01 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (26 votes), past polls