Quanetic Software May 9, 2008  
 Fun Things
  Java
  Music
  Chess
  RegEx Test
  PrePak Website
 Site Stuff
  Home
  Resume
Does it match?
Regular Expression Tester

Anytime I use regular expressions (aka "regex"), I find myself doing a bit of trial-and-error until I get the right pattern. So, I whipped up this simple utility to help.

The tool will tell you where, if any, the patten is matched in your string by replacing any matching parts with [!MATCH!], and will point out parenthesized substrings.

If you're new to regexes, a good book to check out is Mastering Regular Expressions.

Pattern:
Haystack:
preg (PCRE) ereg (POSIX)
Some helpful hints, from PHP's ereg page:
^Start of String
$End of string
\Escape the next character; interpret it literally
n*Zero or more of 'n'
n+One or more of 'n'
n?A possible 'n'
n{2}Exactly two of 'n'
n{2,}At least 2 or more of 'n'
n{2,4}From 2 to 4 of 'n'
()Parenthesis to group substrings
(n|a)Either 'n' or 'a'
.Any single character
[1-6]A number between 1 and 6
[c-h]A lower case character between c and h
[D-M]An upper case character between D and M
[^a-z]Absence of lower case a to z
[_a-zA-Z]An underscore or any letter of the alpha
This site constructed sometime in 2001.
info@quanetic.com