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

Re: first two words-pattern matching

by matija (Priest)
on May 12, 2004 at 06:19 UTC ( [id://352654]=note: print w/replies, xml ) Need Help??


in reply to first two words-pattern matching

^(\w\s+\w\s) That matches a single character folowed by one or more spaces, folowed by another single character, folowed by one space.

What you probably want is something along the lines of

^(\w+\s+\w+\b)
Note that I removed the final space from your match by replacing it with \b - I assume you don't really need that final space.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://352654]
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-04-20 03:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found