View Single Post
Old 12-25-2012, 12:20 PM   #2
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,979
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3 and Fire
What I have used is:
Code:
//*[re:test(., '^[A-Z][A-Z][ A-Z-]+$')]
This is the start of an element (^) followed by two capital letters followed by at least one more capital letter or space or dash ([ A-Z-]+) with this pattern all the way to the end of the element ($).

Sometimes the ^ and/or the $ needs to be left off, but they prevent false positives when they work at all.
wallcraft is offline   Reply With Quote