Regular Expression Pattern: (include the delimiters)

Test Subject:

Help for Perl Compatible Regular Expressions, #3

This is a test form for basic regular expression matching.

This builds on the information in the previous version. The following tables show the quantifiers and character classes that can be used to build the match expression.

TABLE 14.2 Quantifiers
Character Meaning
? 0 or 1
* 0 or more
+ 1 or more
{x} Exactly x occurrences
{x,y} Between x and y (inclusive)
{x,y} At least x occurrences

TABLE 14.3 Character Classes
Class Shortcut Meaning
[0-9] \d Any digit
[\f\r\t\n\v] \s Any white space
[A-Za-z0-9_] \w Any word character
[^0-9] \D Not a digit
[^\f\r\t\n\v] \S Not white space
[^A-Za-z0-9_] \W Not a word character

You can enter patterns and subject strings in the text entry boxes, and click the "Test!" button to run the match. The "Load Sample Text" buttons will fill some sample text values into the form. The samples show a few uses of the regular expression meta-characters, quantifiers and character classes. Feel free to modify the text in the pattern or subject string and re-test the expression.

If there is a match found, the first matching portion of the subject line will be highlighted in yellow in the results that are presented after the match is submitted.