A programmer who hates coming up with regular expressions has produced a visual tool for automatically generating them. You paste in a block of text, identify the parts of it you'd like your regexp to catch, and it produces an (admittedly inelegant but absolutely functional) regexp ready for your use. The programmer explains, "It's free because I have been helped in my career so much by the programmers who generated free systems like linux, apache, php and mysql - this is the only free labour that I have ever given back to the community."
So what does txt2re do?
This system acts as a regular expression generator. Instead of trying to build the regular expression, you start off with the string that you want to search. You paste this into the site, click submit and the site finds recognisable patterns in your string. You then select the patterns that you are interested in and it writes a fully fledged program that extracts those patterns from that string. You then copy the program into your editor or IDE and play with it to integrate it into your program.
Thats appalling - where's the subtlety and art of crafting a beautiful regular expression in that?
There is none.
The office I work in is full of things old people buy to make themselves feel young again. I can honestly say that our awesome new toy, The Swagtron T3 Hoverboard, makes me feel very, very old. I’ll explain why later. Swagtron T3 Pros There’s no way to overcharge the battery and that means no […]
One thing that’s consistent among amateur pool players is that they unknowingly stand up during their shots. Just as in golf, pool players need to keep their heads down and stay still after they shoot in order to hit straight. The DIGICUE helps keep shots consistent by letting you know every time you’ve had extra […]
A leaked memo from Apple CEO Tim Cook to his staff explaining why he met with Donald Trump — a guy who called Apple traitors for refusing to defeat their own security — explains the rationale: “tax reform.”
Traditional folding wallets are designed for paper bills—but these days, carrying cash is rarely a necessity. More often than not, I don’t carry cash at all. This Bogui Clik Wallet is the best answer I’ve found for avoiding the hassle of those tight-fitting credit card pockets.This attractive, minimalist wallet features a protective lip, so my cards don’t […]
Using my iPhone while it’s charging is always a hassle. With tucked-away outlets and the meager length of included lightning cables, comfortable scrolling while plugged in is annoying. These 10-Ft MFi-Certified Lightning Cables are super convenient and probably the best iPhone accessory purchase I’ve made.At over three times the length of normal cables, these reach anywhere you […]
With countless applications for modern life, artificial intelligence (AI) is one of the most in-demand fields of study in tech. Beyond modelling human decision making processes and learning abilities, AI can be used to analyze massive volumes of data and create complex interactive systems.This Machine Learning & AI for Business Bundle made mastering these concepts possible for […]