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.
You’d be forgiven for thinking the videocassette format long-dead, but it turns out that Betamax is still around. Sony is finally going to withdraw tapes from sale, bringing a 40-year story to an end. The last recorders were sold in 2002. ベータビデオカセットおよびマイクロMVカセットテープ出荷終了のお知らせ [Sony; via The Verge]
A leaked Comcast memo discloses that the company’s consumer data caps have nothing to do with network congestion, contrary to its public claims. The internet service provider has often complained (such as when lobbying against net neutrality) that it must impose limits on service to prevent network congestion. The argument suggests that these measures are […]
The Code Black is our top-selling drone of all time—and for good reason. This powerful, palm-size drone is not only insanely fun to fly, but can capture some serious video footage from up above. With a flight time of about 10 minutes and an ultra-smooth ride, it’s a great introductory drone for anyone looking to […]
Don’t get handcuffed by Apple’s standard 3-foot Lightning cord (that you’ve most likely already lost), treat yourself to 10 feet of luxurious charging convenience. The Colossal is certified by Apple for its high-end quality, and designed to support full use of your phone while you power up. You can also get it in a 2-pack […]
Today and tomorrow only we are offering an additional 15% off the entire Boing Boing store (some exclusions may apply). Simply use coupon code: BLACKFRIDAY at checkout! Below are a few of our favorites from the store: First Generation Lytro 16GB Camera: The First Consumer Camera to Capture the Entire Light FieldAdobe Training Videos: Lifetime Subscription: 6,000+ Adobe […]