Regular Expression Testing Tool

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]
Be Sociable, Share!

    Like this post? Sign up to get posts delivered to your inbox.

    Comments

    Trackbacks

    1. [...] Concordancia de expresiones regulares: Las expresiones regulares permiten definir un objetivo que abarca múltiples URLs. Este tipo de oncordancia es útil cuando se trabaja con múltiples subdominios y/o páginas dinámicas.Por ejemplo podríamos definir un objetivo que corrsponda con urls del tipo:rss.hellogoogle.com/subscribe/gracias_por_suscibirse.php?auth=true&id=6687639082 mail.hellogoogle.com/subscribe/gracias_por_suscibirse.php?auth=false&id=2389098822Con esta expresión regular:^/subscribe/gracias_por_suscibirse.php?id=true|false&id=.*Recuerde que tiene a su disposición varias herramientas para testar expresiones regulares. [...]

    Leave a Reply

    Your email address will not be published. Required fields are marked *

    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>