6 ms·
ReFiddle: Fiddle for Regexp testing
- thomasbachem 14y agoAwesome! I'm however unable to make negative lookaheads and lookbehinds work right now – though Ruby & .NET are said to support them according to http://en.wikipedia.org/wiki/Comparison_of_regular_expression_engines http://en.wikipedia.org/wiki/Comparison_of_regular_expressio....
- danbee 14y agoRex V (http://www.rexv.org/ http://www.rexv.org/) is my current favourite regex playground.
- obeattie 14y agoWould be great if there were support for more Regex types. All those supported by grep (ie. BRE, PRE, PCRE) seem fairly essential – and being a Python guy, Python would be nice too (which are PCRE-ish). Nice work, though.
- draegtun 14y agoFor a CLI debugger/play-through have a look at Regexp::Debugger (I posted this video link yesterday - http://news.ycombinator.com/item?id=4136179 http://news.ycombinator.com/item?id=4136179)
- FreshCode 14y agoMore contrast, please. I can barely see the green matches on my screen.
- damncabbage 14y agoNice work! :) http://rubular.com http://rubular.com is also a good one (Ruby regexes).
- mtrn 14y agoRubular is great - I like their UI better than the one of the [js|re]Fiddle[s]?.
- dave1010uk 14y agoPerhaps you mean: (js|re)?Fiddles?
- RegEx 14y agoI don't know, I'm pretty fond of |Fiddle myself ;)
- henriks 14y agoI'll go ahead and recommend RegexBuddy (http://www.regexbuddy.com/ http://www.regexbuddy.com/) as another useful tool for testing regexes. (No affiliation, this just happens to be one of the most useful programs I've bought with my own money.)
- henrikschroder 14y agoI was gonna recommend this as well, then I saw your comment, and then I saw your username, and then it got really weird.
- philbarr 14y agoDon't you hate it when you make a comment through an old HN account and then completely forget about it and post through your normal HN account a quarter of an hour later?
- antihero 14y agoRegexBuddy is fantastic, I bought it ages ago and lost my license key thing. Also it's Windows only (boo!).
- sleepyhead 14y agoOne of the few Windows apps I miss. Fantastic software.
- bloblaw 14y agoIt works on Linux perfectly via WINE. And OSX via WINE. http://www.regexbuddy.com/wine.html http://www.regexbuddy.com/wine.html
- neovive 14y agoRegexbuddy was critical for success on three Regex heavy projects I worked on a few years ago. I still have it running on an old Windows PC.
- rkwz 14y agohttp://www.regexpal.com/ http://www.regexpal.com/ is a good alternative too
- dfc 14y agoIf you are looking for a command line regexp builder I highly recommend txt2regex. It is a giant bash script so it runs anywhere bash does and supports: a) +awk m) +mysql b) +ed n) +ooo c) +egrep o) +perl d) +emacs p) +php e) +expect q) +postgres f) +find r) +procmail g) +gawk s) +python h) +grep t) +sed i) +javascript u) +tcl j) +lex v) +vbscript k) +lisp w) +vi l) +mawk x) +vim http://aurelio.net/txt2regex/ http://aurelio.net/txt2regex/
- gojomo 14y agoMy entry into this category: http://regex.powertoy.org/ http://regex.powertoy.org/ It makes use of a hidden Java applet -- so it supports the somewhat larger Java regex syntax, doesn't send your data anywhere else for matching, and can hook into the string-probing to animate the process. (Click the 'animate?' link to show the animation step/speed controls.) For example, you can watch the regex that tests whether a number is prime (by failing) or composite (by succeeding) via these two animations: 49: http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24/&syn=perlSyntax&anim=1&rep=&in=1111111111111111111111111111111111111111111111111 http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24... 47: http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24/&syn=perlSyntax&anim=1&rep=&in=11111111111111111111111111111111111111111111111 http://regex.powertoy.org/?pat=/^1%3F%24|^%2811+%3F%29\1+%24... Is the applet requirement a deal-breaker for casual use? I might be able to feed the OpenJDK 7 regex classes through the Google Java->JS cross-compiler to get a pure-JS solution with the same syntax/animation capabilities.
- zitterbewegung 14y agoI don't think its a deal breaker but if its a hidden java applet then why not have the regexes processed on the server as a servlet and sandbox them with a timeout?
- gojomo 14y agoThat could work, but an original design goal was to avoid server dependencies or bottlenecks. For instant display or the stepwise animation, the lag of a server roundtrip could be a problem; for some users, posting data to a remote service might introduce privacy concerns. (The regex-powertoy can be run completely locally.)
- ibotty 14y agowell. for some it is because they don't run java (e.g. me) but for the large population it will not matter.
- vanmik 14y agoThe best tools out there for regexp testing is http://gskinner.com/RegExr/ http://gskinner.com/RegExr/ - the only flash application i've ever used
- john2x 14y agoI've been using RegExr[1]. It's Flash/Flex, the "Community" tab is useful for finding common RegEx's. [1] http://gskinner.com/RegExr http://gskinner.com/RegExr
- bpierre 14y agoCool! Is the code open source?
- esschul 14y agoI use sublime text for this. Considering how many regexes I write a day, I actually need a text editor that has this support. Don't you ? :)
- MatthewPhillips 14y agoNo. Regexes are a hack. I don't write them every day, I write them when I need a hack to get around a problem there isn't a good solution for.
- esschul 14y agoWhy do you say regex's are hacks? Aren't they nice to use in order to search and replace text? It's really powerful!
- dr42 14y agoRegexs are not hacks. They are part of a programmers toolchest. Just because you write them when you cannot think of a better solution doesn't make them a hack. They are a legitimate solution for efficient text matching problems.
- Flenser 14y agoSome other online regex tools that you may find useful depending you what flavour of regex you want to create and how proficient you are with them: • http://www.rexv.org/ http://www.rexv.org/ — Supports: PCRE, Posix, Perl, Python, JS, Node.js modifiers. Only works online though. • http://gskinner.com/RegExr/ http://gskinner.com/RegExr/ — Implemented in Flash. Desktop version available. • http://regexpal.com/ http://regexpal.com/ — Javascript regex only.
- silverlight 14y agoYou are my hero.
- bloblaw 14y agoI've used lots of regex tools over the years, but I stopped looking once I bought RegexBuddy. See a demo: http://www.regexbuddy.com/demotest.html http://www.regexbuddy.com/demotest.html It's a Windows program, but runs on Linux via WINE. It lets you debug regexes, has live highlighting of matched text, generates regex code in 15+ languages (Perl, Python, Ruby, PHP, C, C#, C++, Delphi, Java, Javascript, MySQL, etc) and is all around awesome. I'm not affiliated with this program, but it is the BEST regex creation/testing program available anywhere. It will save you oodles of time if you create (or debug) regular expressions more than 2 times in a year. It's the best software product I've ever bought with my own money.
- tonyz 14y agoIf you work with .NET regex, I recommend http://regexhero.net/ http://regexhero.net/
- nicpottier 14y agoVery nice, please add Java and Python support, but otherwise really dig it.. the tests are especially neat.
- boatmeme 14y agoNice work! It sure do got a purty mouth.
- regexplanet 14y agoI too have a website that does regex testing. It supports Java, JavaScript, .Net, Perl, PHP, Python, Ruby & XRegExp, though some are more complete than others. And it supports sharing & a cookbook too. http://www.regexplanet.com/ http://www.regexplanet.com/
- drivingmenuts 14y agoI've always been a fan of Reginald (http://atastypixel.com/blog/reginald-regex-explorer/ http://atastypixel.com/blog/reginald-regex-explorer/) on OS X.
- captnswing 14y agoI can totally recommend Patterns, with support for java, python, ruby etc http://itunes.apple.com/us/app/patterns-the-regex-app/id429449079?mt=12 http://itunes.apple.com/us/app/patterns-the-regex-app/id4294...
- chrismckee 14y agoThis regex creator is one I've used for ages; its a bit ugly but it generates the regex for Perl PHP Python Java Javascript ColdFusion C C++ Ruby VB VBScript J#.net C#.net C++.net VB.net. You type an example (or the actual) string you plan to search over, click submit and it generates a weird chart that you can use to select which bits you want your regex to find. Really advise giving it ago; no regex knowledge required and more importantly.. fast.