JavaStar
JavaStar is an online regular expression tester that uses RegExPlus to check for matches. It supports the majority of syntax available in Perl/PCRE and .NET.
Enter a regular expression to test, and the input to test it against.
After pressing the "find matches" button, the matches will be shown, along with any capturing groups. If a capture group is a named group, the name of the group will be shown as well.
If there are no matches, whether the input is a partial match will be shown.
Summary of regular-expression constructs
Roll over a specific syntax for more details (via a ToolTip).
Characters
\0n \0nn \0mnn
\xhh \x{hhh..} \uhhhh
Character classes
[a-z&&[def]] [a-z&&[^bc]] [a-z&&[^m-p]]
Predefined character classes
POSIX character classes (US-ASCII only)
\p{Alpha} \p{Digit} \p{Alnum}
\p{Punct} \p{Graph} \p{Print}
\p{Blank} \p{Cntrl} \p{XDigit} \p{Space}
[:class:] syntax for POSIX classes is also supported.
java.lang.Character classes (simple java character type)
\p{javaWhitespace} \p{javaMirrored}
Classes for Unicode blocks and categories
\P{InGreek} [\p{L}&&[^\p{Lu}]]
Boundary matchers
Greedy quantifiers
Reluctant quantifiers
Possessive quantifiers
Logical operators
Capturing
Back references
\g-n \g{-n}
\k<name> \k'name' \g{name}
\k{name} (?P=name)
Quotation
Special constructs (non-capturing)
(?>X) (?idmsuxJn-idmsuxJn) (?|X)
Assertions (non-capturing)
Comment (non-capturing)
Conditional patterns (non-capturing)
(?(condition)yes-pattern)
(?(condition)yes-pattern|no-pattern)
(?(<name>)...) (?('name')...) (?(name)...)
(?(assert)...)
Numeric ranges (non-capturing)
(?NZ[start..end]) (?NZ16[start..end])
A special thanks
The inspiration for this page's layout was taken from these excellent regular expression testers:
- Derek Slager: A Better .NET Regular Expression Tester
- Regex Powertoy (interactive regular expressions)
I also want to thank Ajaxload - Ajax loading gif generator, which I used to generate the loading gif.
