3 ms·
Sounds like you're going down a terrible path, but I'll help you fan the flames: http://www.regular-expressions.info/lookaround.html http://www.regular-express
by logn 13y ago
Sounds like you're going down a terrible path, but I'll help you fan the flames:
http://www.regular-expressions.info/lookaround.html 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