Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
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 examining the Monastery: (7)
As of 2015-07-30 11:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (271 votes), past polls