Regular Expression Testing Tool

December 6, 2006 by Justin

Over the past few months, Robbin Steif from LunaMetrics has been writing a series of posts about regular expressions. The series is amazing and I highly recommend it to anyone learning reg ex (as the geeks call it).

In one of Robbin’s posts she mentions a small, reg ex testing tool that we have on the EpikOne website. This tool was created by Alex, one of the founders of EpikOne. It is easy to access, easy to use and incredibly helpful. I’ve decided to repost the tool here to increase it’s visibility.

Regular Expression Testing Tool

Target String:
Regular Expression:
Result:

How to use it

  1. Enter the text that you want to apply the regular expression to in the ‘Target String’ field
  2. Enter your regular expression in the ‘Regular Expression’ field
  3. Click the ‘Submit’ button

How to interpret the results

  • If the regular expression matches any part of the target string then the ‘Result’ field will contain the word ‘Match:‘ followed by the part of the target string that was matched by the regular expression.
  • If the regular expression does not match any part of the target string then you will see ‘No Match‘ in the result field.
  • If you use parenthesis in your regular expression to capture part of the target string, then the tool will return the data stored in the parenthesis. The result field will contain both the part of the string that was matched AND the values in the parenthesis. First, you will see the term ‘Match:‘ followed by the part of the string that was matched. Then you will see the value stored in each set of parenthesis. Here’s an example.
Match: [matched part of string], [parenthesis value 1], [parenthesis value 2], [parenthesis value X]
  • Twitter
  • StumbleUpon
  • Digg
  • del.icio.us
  • Facebook
  • LinkedIn
  • FriendFeed
  • Sphinn
  • Google Bookmarks
  • Reddit
Subscribe:
  1. 12 Responses to “Regular Expression Testing Tool”

  2. Also take a look at http://regexlib.com/. no need to completely re-invent the wheel.

    By ajp on Jan 6, 2007

  3. Hi ajp,

    Thanks for the link! That’s a great site.

    Justin

    By Justin on Jan 8, 2007

  4. Hey Justin — where’s the option to test advanced filters? ;-)

    By Mike on Feb 21, 2007

  5. Hey Mike, great idea! I’ll get it done in all my copious spare time ;)

    By Justin on Feb 21, 2007

  1. 8 Trackback(s)

  2. Apr 16, 2007: Increasing your Website’s Conversion Rate » Blog Archive » Regular Expressions question and GA: Search/Replace
  3. May 4, 2008: links for 2008-05-04
  4. Jan 19, 2009:   Google Analytics Filters (& Reguliere Expressies) - deel 2 | Webanalisten.nl
  5. Jan 19, 2009:   Google Analytics Filters (& Reguliere Expressies) - deel 2 | Webanalisten.nl
  6. Jan 19, 2009:   Google Analytics Filters (& Reguliere Expressies) - deel 2 | Webanalisten.nl
  7. Jan 19, 2009:   Google Analytics Filters (& Reguliere Expressies) - deel 2 | Webanalisten.nl
  8. Feb 23, 2009: Tutorial sobre Google Analytics: 4. Objetivos, Conversión de objetivos, ruta de redireccionamiento y Funnels | Hello Google
  9. Dec 12, 2009: analitycs » Blog Archive » ¿Qué es un objetivo ?

Post a Comment