October 11, 2006
Google Code Search - RegExp on Google
I'm fast becoming addicted to Google Code Search, even though there's no site-specific meta (e.g., the equivalent of site: in a standard Google searchphrase), and I'm going to have to go through deep circles of the Inferno to get the massive ddj.com code archives indexed. At least part of the appeal, here, is that GCS uses regular expressions -- letting you drill, drill, drill down to the precise snippet of code you want to review. This morning, I was using it to track down C++ implementations of the Mersenne Twister RNG (because I need to translate it into a very weird and obscure scripting language used by the front-end for a popular MMORPG, so my consortium can play Texas Hold 'Em in virtual reality ... everybody has a hobby, right?)
If your grasp of RegExp is limited, or if you just want to stop pounding your head and start producing regular expressions that work the first time (I'm convinced that somewhere, there's a happy land filled with programmers who not only have no trouble remembering and flawlessly applying core and extended RegExp syntax and semantics, but can also effortlessly trans-escape and intermogrify their 'standard' expressions to work in environments like PHP and javascript ... I just don't know any of those people, personally), then you need to run ... do not walk to this site and buy (for very little money, which you will never begrudge) a copy of RegExp Buddy -- a very beautiful piece of software that parses regular expressions into a nice, clear tree of English-language statements, showing you exactly what your '\/[0-9]*{4,}blah/gi' does; lets you run it against sample data; and lets you cut and paste working RegExp flawlessly, to and from the escaped and intermogrified formats required by many popular language environments.
Posted by John Jainschigg at 12:41 PM Permalink
|