Tuesday, December 29, 2009

Chrome Extension - Regular Expression Checker

On firefox, there are quite a few regular expression tester add-ons. Unfortunately, there has not been any for Chrome yet. So I decided to make a simple one.

Here it is, Regular Expression Checker 1.0


Simple regular expression checker/tester.

==== Features under development ====
 1. save regular expressions
 2. provide a library of pre-built regular expressions
 3. replace feature
 4. regex match status (how many matches, how many subpatterns, etc)


4 comments:

  1. I am familiar with regular expressions as used in Perl. This sounds like a useful tool but I can tell nothing from the screenshot. It looks more like an expression search tool. Am I missing something?

    ReplyDelete
  2. A lot of times you run into the situations where you want to know if your regular expression is valid, and matches what you need to match. In Perl or PHP, you often have to write a test script to just test out your expression (running in CLI) which to me is always a hassle and I have to do it quite often if my project requires a lot of regex. This tool has these testing capabilities pre-built for you so you can quickly get to your test instead of building a script just for a test.

    ReplyDelete
  3. I'm having trouble matching carriage return/line feeds. For example ...

    Search for : (\r\n){1}$
    Replace with: [space character]

    i.e. I want to replace one occurrence of carriage return/line feed with one space. Most mail clients word wrap by putting a hard return at a specific column number - I want to undo this; if I don't replace for two successive carriage return/line feeds then I get to keep the (intended) paragraphs.

    Can you provide a link to the help for the specific regular expression engine that you are using?

    Thanks,

    John

    ReplyDelete
  4. @JB
    I'm gonna have to test out this one
    also, when you copy paste \r\n, i'm not too sure if it gets auto cleaned by chrome into just \n
    what you can try is (\r?\n){1}$

    ReplyDelete