\b([A-Z\s]+)\b
This doesn't work because the space in the character class means it matches the first single space in the line and returns that. You need to ensure that the match starts with an UPPER alpha, and then continues with UPPER alpha or space:
print $data =~ m/(\b[A-Z][A-Z ]+\b)/;; TEST SENTENCE
In reply to Re^2: Extract sequence of UC words?
by BrowserUk
in thread Extract sequence of UC words?
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |