Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^2: Extract sequence of UC words?

by Anonymous Monk
on Aug 18, 2008 at 14:04 UTC ( [id://704935]=note: print w/replies, xml ) Need Help??


in reply to Re: Extract sequence of UC words?
in thread Extract sequence of UC words?

Thanks, I modified it like so:
/([A-Z\|\s+]+)+/

Replies are listed 'Best First'.
Re^3: Extract sequence of UC words?
by FunkyMonk (Chancellor) on Aug 18, 2008 at 14:15 UTC
    | and + inside a character class aren't special, they're just regular characters, so your regex would match "FO O|B+++A R". /[A-Z ]+/ (which is what I think you probably meant) won't work either.

    Bonus points will be given if you tell us why!

    Update: BrowserUK has already seen what was missing. You missed out AnonyMonk

Re^3: Extract sequence of UC words?
by Anonymous Monk on Aug 18, 2008 at 14:20 UTC
    Note that the regex expression  [A-Z\|\s+] defines a set of characters that includes the '|' ('pipe') character. Within a character set, the pipe has no special meaning; i.e., it is not the regex alternation metacharacter.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (4)
As of 2024-04-24 20:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found