News for hackers. Stuff that matters.
Re:Regular Expression Tool for Live Editing/Testing of RegEx... by thaumaturgy on Wednesday October 21, 2009 @10:46AM (#894738)
Yeah, this one's going straight into my bookmarks file. I've never been able to quite get my head around regular expressions -- they don't work the way I think -- and yet I keep writing things that use them.

Thank you for posting this.

Re:Regular Expression Tool for Live Editing/Testing of RegEx... by enobrev on Wednesday October 21, 2009 @11:27AM (#894829)
I Highly recommend Mastering Regular Expressions by Jeffrey Friedl. http://regex.info/
Re:Regular Expression Tool for Live Editing/Testing of RegEx... by KrisJordan on Wednesday October 21, 2009 @10:51AM (#894745)
This is my first jQuery "app" (mini-app). After going through numerous write/print debug loops writing Regular Expressions and being inspired by Crockford's "JavaScript: The Good Parts" this seemed like a fun tool to try and write in JavaScript/jQuery. Appreciate any feedback.

Hope this Regular Expression tool is useful to other HN readers!

Re:Regular Expression Tool for Live Editing/Testing of RegEx... by endergen on Wednesday October 21, 2009 @11:06AM (#894777)
Great tool. I built something similar for an internal project at my startup inspired by these two projects by Oliver Steele:

http://osteele.com/tools/rework/

http://osteele.com/tools/reanimator/

Re:Regular Expression Tool for Live Editing/Testing of RegEx... by MindTwister on Wednesday October 21, 2009 @11:35AM (#894845)
Visually just... cool finite state machines are just... interesting.
Re:Regular Expression Tool for Live Editing/Testing of RegEx... by KrisJordan on Wednesday October 21, 2009 @11:12AM (#894798)
Wow, reAnimator is incredible. Great links.
Re:Regular Expression Tool for Live Editing/Testing of RegEx... by endergen on Wednesday October 21, 2009 @11:20AM (#894817)
Yes. I was very impressed by it. It made me finally go and dive deep into learning regular expressions.

Oliver Steele's works/writings in general are all very interesting.

Re:Regular Expression Tool for Live Editing/Testing of RegEx... by audionerd on Wednesday October 21, 2009 @11:45AM (#894871)
Nice execution, and a clever marketing tool to reach developers who might consider their CMS.

I've been really happy with Rubular for testing regexps targetting Ruby (http://rubular.com).

Re:Regular Expression Tool for Live Editing/Testing of RegEx... by petesalty on Wednesday October 21, 2009 @02:22PM (#895296)
As a Ruby programmer I just can't live without Rubular. It's saved my ass countless times.
Re:Regular Expression Tool for Live Editing/Testing of RegEx... by mustpax on Wednesday October 21, 2009 @01:02PM (#895054)
This is great stuff, definitely will be using it in the future.

It's worth noting, though, that this only runs the JavaScript style Regular Expressions. Escape sequences and such things will vary to a degree between different RegEx flavors. So keep that in mind if you use this tool to trouble shoot any patterns for other languages with this tool.

Re:Regular Expression Tool for Live Editing/Testing of RegEx... by tommy_mcclung on Wednesday October 21, 2009 @01:51PM (#895207)
My last startup was a company called IMSafer http://www.imsafer.com. We built an entire product around extensive and extremely complicated regex's to find patterns of language that might indicate a sexual predator going after a kid. The only tool that was useful to me was Regex Buddy http://www.regexbuddy.com. Downside is that it doesn't run on the Mac, but I'm telling you for creating and debugging regular expressions it is THE tool to use. We had to optimize not only for matching, but for performance and as you know if you write your regex's wrong, you can kill performance. Regex Buddy has a debug mode that lets you see all the steps taken by the regex and lets you find ways to optimize. Highly recommended.
Re:Regular Expression Tool for Live Editing/Testing of RegEx... by yeahit on Wednesday October 21, 2009 @01:34PM (#895159)
I use this - try example 4:

http://en.gibney.org/calculator/

Re:Regular Expression Tool for Live Editing/Testing of RegEx... by mkyc on Wednesday October 21, 2009 @01:12PM (#895085)
Re:Regular Expression Tool for Live Editing/Testing of RegEx... by songism on Wednesday October 21, 2009 @02:20PM (#895293)
i prefer http://www.gskinner.com/RegExr/

mouse over each part of your regular expression to see what it does

Re:Regular Expression Tool for Live Editing/Testing of RegEx... by gojomo on Wednesday October 21, 2009 @12:41PM (#895010)
Very pretty!

My own take on the same tool also uses jQuery, plus an invisible embedded Java applet to (1) have access to Java's expanded regex syntax, and (2) enable step-by-step animation of probes of the input text used to discover matches. Try it at:

http://regex.powertoy.org