Handy online regex tool for PHP, Perl, JS and Python



A coworker of mine has been working on a ajax enabled regex tool which lets you evaluate regex expressions in several languages (including PHP PCRE and PHP POSIX) with instant results. You can choose which functions to use, such as match, match all, replace, split etc. It also offers some basic help and hints. It’s really handy when working on those painful expressions.

You can check it out at http://regex.larsolavtorvik.com/. Stop by his blog as well.

Technorati Tags: , , ,

Share and Enjoy:
  • Digg
  • del.icio.us
  • Facebook
  • Google
  • description
  • Live
  • Slashdot
  1. #1 by Toby - April 29th, 2008 at 12:01

    Test

  2. #2 by Toby - April 29th, 2008 at 12:03

    You should really disallow the ‘e’ modifier with preg_replace(). This is an extract of your /etc/passwd:


    backup:x:34:34:backup:/var/backups:/bin/sh list:x:38:38:Mailing List Manager:/var/list:/bin/sh

    One can also perform any php command through it.
    Just to let you know.

  3. #3 by admin - April 29th, 2008 at 14:54

    Toby: Just to make it clear, it’s not my code and it’s not my domain ;)

    My coworker was already notified about this, and removed it. Derrick sent him a sms :)

  4. #4 by Bayrak - May 1st, 2008 at 01:40

    do you know any information about this subject in other languages?

  5. #5 by nev3rm0re - May 5th, 2008 at 10:19

    I use this online regex tool: http://www.rexv.org/
    Check it out.

  6. #6 by admin - May 5th, 2008 at 10:26

    nev3rm0re: That’s pretty sweet as well, but I’d like to see support for testing in more languages there.

  7. #7 by Hans Zena - November 13th, 2008 at 09:50

    This one looks handy, javascript regex tester under all methods, generate js code and all.

    http://www.pagecolumn.com/tool/regtest.htm

  8. #8 by Mark - March 12th, 2010 at 19:24

    Found a website where you can test a wide variety of languages and methods, from preg_replace in PHP to match in Java.

    http://www.regex-test.com

(will not be published)