A solution for all those that hate regular expressions

Regular expressions are hideous, near-unintelligible strings of code that are hard to write, and almost impossible to read. They are used to extract things from text, such as a date, or a person’s name.

Just this morning I was thinking about how one might create a tool which would generate regular expressions automatically from some example text, when I stumbled on txt2re.com. You type in an example of the type of text you want to match, and then a few clicks later you have your regular expression! Even better, it will generate code for you in a variety of languages, including my favorite, Java.

Definitely one of my better finds this month…

Leave a Reply

Your email address will not be published.