r/Python • u/luciferreeves • Sep 12 '22
Intermediate Showcase I hate regular expressions, so I built a library which makes it easier!
A few days ago, I built Edify, which allows you to build regular expressions in a programmatic way. It comes with pre-built common patterns (email, ip, phone, etc.) and a RegexBuilder class for your almost all your custom regex needs. I released v0.1.0 recently on PyPI and now, I am working on improvements. Will appreciate any inputs - issues or PRs if you got time or just a simple star for the repo would be very helpful.
Repo: https://github.com/luciferreeves/edify
PyPI: https://pypi.org/project/edify/
Complete Docs: http://edify.rtfd.io/
View all comments
Show parent comment
2
u/IlliterateJedi Sep 13 '22
Sure. It's not terribly hard to do.
Positive lookahead for any letter a-z any number of times followed by the letter you want.
You use character not in range groups for each letter.
So if you play 'stain' and 'stin' are ruled out with a yellow a you can do this: