RegexPlanet
Testing
Patterns
Status
Support
Java Regular Expression Test Page
JavaDoc
Share:
Expression to test
Regular Expression
Replacement
Options
Help
Canonical equivalence. (
CANON_EQ
)
Case-insensitive matching. (
CASE_INSENSITIVE
)
Allow whitespace and comments in pattern. (
COMMENTS
)
Enables dotall mode. (
DOTALL
)
Literal parsing of the pattern. (
LITERAL
)
Multiline mode. (
MULTILINE
)
Unicode-aware case folding. (
UNICODE_CASE
)
Unix lines mode. (
UNIX_LINES
)
Test
Results
Clear
Regular Expression
\p{Alpha}+([ ,.'-]\p{Alpha}+)
as a Java string
"\\p{Alpha}+([ ,.'-]\\p{Alpha}+)"
Replacement
groupCount()
1
Test
Target String
matches()
replaceFirst()
replaceAll()
lookingAt()
find()
group(0)
group(1)
1
,,,,
No
,,,,
,,,,
No
No
Inputs
Test
More inputs
Switch Engines
Switch Engines