View Single Post
Old 07-19-2013, 08:55 AM   #2
gmw
cacoethes scribendi
gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.gmw ought to be getting tired of karma fortunes by now.
 
gmw's Avatar
 
Posts: 5,818
Karma: 137770742
Join Date: Nov 2010
Location: Australia
Device: Kobo Aura One & H2Ov2, Sony PRS-650
If you're using OpenOffice/LibreOffice then you can use the end-word flag. (The effect is probably no different, but it's shorter to type.) Using [:alnum:] is not much shorter but I would hope (but don't actually know) it would not be limited to matching only ASCII alphanumerics.

Code:
\>, [:alnum:]+ and
And additional margin of safety may be had by allowing for extra or missing spaces:
Code:
\> *, *[:alnum:]+ +and
Or a variation without alnum that works in at least the basic instances (not sure if unusual punctuation might upset it):
Code:
\> *, *[^ ,]+ +and
None of these are really any better/smarter than what you already had.

If you're using some other software then check which variation of regex they are using to duplicate the effect of the above.
gmw is offline   Reply With Quote