Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: Strange result from "abbbbbc" =~ /(b)*?(b*?)c/

by GrandFather (Saint)
on Aug 01, 2006 at 20:44 UTC ( [id://565078]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    "abbbbbc" =~ /(b)*?(b*?)c/;
    print "($1)($2)\n";
    
  2. or download this
    ()(bbbbb)
    
  3. or download this
    "abbbbbc" =~ /(b)*?(b*?)c/;
    print "\$1: $1\n" if defined $1;
    ...
    Prints:
    
    $2: bbbbb
    
  4. or download this
    "babbbbbcbbbcx" =~ /(b*?)/;
    print ">$1<\n"; # '><' - matched none
    
    "babbbbbcbbbcx" =~ /(b*?)c/;
    print ">$1<\n"; # '>bbbbb<' - matched b following a through b preceedi
    +ng c
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (3)
As of 2024-04-19 16:00 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found