note
amarquis
<p>It grabs only one word because you are matching for a sequence of upper case letters only. To have it match 'TEST SENTENCE' you'll have to have it match upper case letters OR spaces.</p>
<p>But wait! The regex will then actually match ' TEST SENTENCE ' (including the space before and after the capitalized sequence). So what you really need is to make a match of:</p>
<ol>
<li>One upper case letter</li>
<li>Any number of upper case letters/spaces</li>
<li>One upper case letter</li>
</ol>
<p>The requirement to match a beginning and ending upper case letter will also make it not match just the 'F' of 'Foo'.</p>
<p>Edit: [gaal] is smarter than I, heh.</p>
704929
704929