Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: Regexp matching words, not doing what I expect

by moritz (Cardinal)
on May 13, 2009 at 18:11 UTC ( [id://763858]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    my $text = "hello to all the perl monks";
    while ($text =~ /\b([A-Za-z'\-]+) (?=([A-Za-z'\-]+))\b/g) {
        print "$1 $2\n";
    }
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (3)
As of 2024-06-14 02:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?
    erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.