I have a problem where hopefully a RegEx can help me. I want to find all words ending with f, with the exception of a few words. So, I want a hit on for example 'dwarf', but not on 'of' or 'behalf'.
The first part I can cover with \b\w+\b, but can I filter the results with an kind of exception list? I can't seem to find that.
*update* I seem to have found it, but I need to test further. This seems to do what I want:
\b(?!of|behalf)\w+f\b
Last edited by Toxaris; 04-04-2012 at 03:16 AM.
|