News for hackers. Stuff that matters.
Re:Ask HN: So, I need regular expressions... by logn on Monday May 27, 2013 @09:24AM (#5774546)
Sounds like you're going down a terrible path, but I'll help you fan the flames:

http://www.regular-expressions.info/lookaround.html

(?<!si)ze

And by saying this is a terrible path, I mean, spelling and grammar are highly irregular with all sorts of exceptions. Unless you can distill down rules that will always exist, like 'z' will never be turned to an 's' if 'si' precedes it, then I think you're better just building a dictionary of substitutions. If you have to for some reason express this in regex only, then build a simple wordlist of substitutions and run a script on it to convert it to regex, e.g., \b(analyze|theorize|rationalize)\b

There are no comments on this comment yet.