Home
Tester
Reference
About
Pattern
^(?<zip>\d+-\d+)\s+(?<city>.*?)(?:\s+(?<state>[A-Z]{2}))?\r?$
Input
98225-2077 New Dehli WA
98225-2077 New Dehli
98225-2077 New Dehli WA 98225-2077 New Dehli
Options
Ignore Case
Ignore Whitespace
Explicit Capture
Culture Invariant
Singleline
Multiline
Right To Left
ECMA Script
Start from position:
Max matches to find:
Replacement
Replace matches with...
Click the
context
tab to see replacements.
Regex Info
Table
Context
Split List
2
matches found in about
7
milliseconds.
Show Permalink
Permalink
Index
Position
Matched String
${zip}
${city}
${state}
0
0
98225-2077 New Dehli WA
98225-2077
New Dehli
WA
1
25
98225-2077 New Dehli
98225-2077
New Dehli
empty string
98225-2077 New Dehli WA
98225-2077 New Dehli
empty string
98225-2077
New Dehli
WA
whitespace
98225-2077
New Dehli
empty string