Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

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

by GrandFather (Saint)
on Aug 01, 2006 at 20:44 UTC ( #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? | Other CB clients
Other Users?
Others studying the Monastery: (5)
As of 2022-08-15 11:56 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?