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.