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 Cobham catalog, exposed by The Intercept, features countless pages of surveillance gadgets sold to U.S. police to spy on American citizens: tiny black boxes with a big interest in you. In the creepily bland feature lists and nerdy product names is a whisper of a dark future; perhaps darker than anyone can imagine.
This image depicts the most commonly-found stylesheet colors on the web’s top sites—Paul Hebert did an amazing amount of analysis and this is just one of the intriguing visualizations he came up with. Most of these are obvious staples, especially HTML red and blue, though it’s interesting how far the blue “cluster” is from the […]
With the cacophony of an election year ablaze with unparalleled drama being fought on the front lines of Twitter, we find ourselves slowing down and staring at it like a bad accident. The need for escapist relief is perhaps more dire than usual right now. This fall, if it’s drama you crave, but the Hillary […]
TV antennas are making a comeback, and the Ghost Indoor HDTV antenna is a great example of why. Unlike the old bunny ear-style antennas, this compact antenna is barely noticeable and picks up channels easily. Plus with the addition of streaming services like Netflix, we find ourselves with plenty to watch without a pricey monthly cable bill. The Ghost […]
I’ve never really felt the need to purchase a smartwatch because a lot of them aren’t very functional, but at just shy of $30, the Martian Notifier Smartwatch was worth checking out. For that low of a price, it actually does feature an impressive amount of functionality, and comes in handy when you don’t want to be carrying around your […]
Geek Fuel is a subscription delivery service that caters to those of us that love comics, gaming, and general geek culture. Every month, Geek Fuel will assemble a box of goodies with a value of $50 or over. The specific items are a mystery, but you’ll always get an exclusive t-shirt not found anywhere else, a full […]