Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
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 imbibing at the Monastery: (None)
    As of 2016-07-30 07:26 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      What is your favorite alternate name for a (specific) keyboard key?


















      Results (265 votes). Check out past polls.