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.

[tags]PHP,Perl,JavaScript,Python[/tags]

12 Responses to “Handy online regex tool for PHP, Perl, JS and Python”

  1. 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.

  2. 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 :)

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

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

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

  6. [...] Hoem has pointed out an online tool a coworker shared with him to work with regular expressions for multiple languages. [...]

  7. [...] tagged pointedOwn a WordPress blog? Make monetization easier with the WP Affiliate Pro plugin. Handy online regex tool for PHP, Perl, JS and Pyth… saved by 3 others     THJ13 bookmarked on 05/28/08 | [...]

  8. [...] tool which lets you evaluate regex expressions in several languages including PHP PCRE and PHP.http://blog.eirikhoem.net/index.php/2008/04/29/handy-online-regex-tool-for-php-perl-js-and-python/Perl Needs Better ToolsDiscusses the current state of tools for perl development and the need for [...]

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

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

  10. [...] Handy online regex tool for PHP, Perl, JS and Python [...]

  11. 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

Leave a Reply

(required)

(required)

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">