Beefy Boxes and Bandwidth Generously Provided by pair Networks
Don't ask to ask, just ask
 
PerlMonks  

Re: Regex from Learning Perl

by CountZero (Bishop)
on Feb 17, 2012 at 20:17 UTC ( #954615=note: print w/ replies, xml ) Need Help??


in reply to Regex from Learning Perl

It matches:

  • a literal "y"
  • any single character not being a newline (save this in \1), in this case an 'a' is matched
  • any single character not being a newline (save this in \2), in this case a 'b' is matched
  • Match whatever is in \2, i.e. a 'b'
  • Match whatever is in \1, i.e. an 'a'
The match succeeds on yabba already.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics


Comment on Re: Regex from Learning Perl
Select or Download Code
Re^2: Regex from Learning Perl
by rayh (Initiate) on Feb 17, 2012 at 20:21 UTC
    Awesome. Thanks!

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2014-09-15 10:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite cookbook is:










    Results (146 votes), past polls