7

SQLFiddle is a webservice where you can setup and work with small examples of SQL on various systems (PostgreSQL, Oracle, MySQL, etc...)

I am looking for such a webservice or library that parses RegExes in various languages (Java, Perl, C#, etc...) and executes them against a given text.

RegExr is a good start but doesn't allow me to change the implementation.

The idea is to suggest this library/webservice for a problem on Stack Overflow.

5

You should check out RegexPlanet, I think it most closely matches what you are looking for.

RegexPlanet is an

"Online Regular Expression (Regex) Testing and Cookbook for: Go, Haskell, Java, JavaScript, .Net, Perl, PHP, Python, Ruby, Tcl & XRegExp"

  • It has support for 11 languages, including Java, Perl, .NET and Ruby.
  • It even has a shortcode feature for sharing regex snippets (e.g. http://fiddle.re/x9g86) and I've seen it used (and used it myself) in SO questions, e.g. this one.

I've been using it for a while now, highly recommended.

Some screenshots:

enter image description here

enter image description here

2

Ruby:
http://rubular.com/

Rublar is a regular expression editor for Ruby that has inspired many others, and it may be a good search stub.

JavaScript, Python, PCRE:
https://www.debuggex.com/

Debuggex is fairly new, but it sports some pretty nice railroad diagrams for visualizing regular expressions.

Diagrams are especially nice for reading regular expression others have written, for example this (primitive) URL pattern suggested for validation:

^(http|https):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$ 

enter image description here

I use Rubular very frequently, for testing regular expression matches for everything from actual Ruby code to .htaccess files. Ruby, like most things I use, has PCRE regular expessions. So, no real need to use another tool.

I only use Debuggex when I am deciphering large regular expressions that I did not write.

  • Rubular isn't relevant here, being only about Ruby. Debuggex barely, with only three formats. – Gilles 'SO- stop being evil' May 26 '14 at 7:16
  • @Gilles, it absolutely is relevant as it has, as I stated, inspired many other editors, and is a good place to search from. For example alternativeto.net/software/rubular. Also, Debuggex, has support for PCRE regular expressions used in Perl, PHP, Delphi, C, Apache, R, Nmap, Postfix, etc. – kwarrick May 26 '14 at 7:22
  • Moreover, the railroad diagrams on Debuggex are similar to those used in the book Javascript: The Good Parts, and are an excellent addition to the metastackoverflow question linked. – kwarrick May 26 '14 at 7:31
  • @kwarrick Did you use them? If so, what are your experiences? When do you use which? – Angelo Fuchs May 26 '14 at 9:46
  • @AngeloNeuschitzer I use Rubular very frequently, for testing regular expression matches for everything from actual Ruby code to .htaccess files. Ruby, like most things I use, has PCRE regular expessions. So, no real need to use another tool. I only use Debuggex when I am deciphering large regular expressions that I did not write. – kwarrick May 26 '14 at 10:04
0

http://regex101.com/ fits your needs

regular expressions 101  — an online regex tester for javascript, php, pcre and python.

It is one of my favourite regex expression testers. It supports PCRE, Javascript and Python regular expressions. It also includes a powerful debugger and handy quick reference of regex syntax as well as code generation for popular programming languages, so you can copy and paste already escaped regex.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.