note
BrowserUk
<blockquote><i></i></blockquote>
<p>I upvoted your post above, but still your regex <c>m/(\b(?:[A-Z]+(?:\s+[A-Z]+)*)+\b)/g</c> made me squirm. Whenever I see sequences of nested quantifiers like that:<c>+)*)+</c> I get uncomfortable, remembering various pathelogical cases I've constructed in the past.
<p>To that end, I thunk again, and came up with this which I believe meets the 'spec', whilst avoiding the nested quantifiers;
<code>
m[
(
\b
[A-Z]
(?: [A-Z\s]* [A-Z] )?
\b
)
]gx
</code>
<div class="pmsig"><div class="pmsig-171588">
<hr />
<font size=1 >
<div>Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.</div>
<div>"Science is about questioning the status quo. Questioning authority". </div>
<div>In the absence of evidence, opinion is indistinguishable from prejudice.</div>
<div>[http://news.bbc.co.uk/1/hi/education/6202877.stm|"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."]</div>
</font>
</div></div>
704929
705001