, . , . " " - , regex regexp. , , , .

, , - , . , , , . , , :
:
- john_doe;
- jo-hn_doe;
- john12_as.
, , Jo, .
, , . , "The" "t", "h", "e".
- "the" => The fat cat sat onthemat.
, , . , . :
|
|
. |
, . |
[ ] |
, . |
[^ ] |
Negated character class. Matches any character that is not contained between the square brackets |
* |
0 . |
+ |
1 . |
? |
. |
{n,m} |
"n", "m" . |
(xyz) |
. |
| |
. |
\ |
. [ ] ( ) { } . * + ? ^ $ \ | |
^ |
. |
$ |
. |
, . :
|
|
. |
, |
\w |
- :[a-zA-Z0-9_] |
\W |
- :[^\w] |
\d |
: [0-9] |
\D |
: [^\d] |
\s |
: [\t\n\f\r\p{Z}] |
\S |
: [^\s] |
Look Around
Look Around , , . , , , .
|
|
?= |
Lookahead |
?! |
Lookahead |
?<= |
Lookbehind |
? |
Lookbehind |
, . .
|
|
i |
: . |
g |
: . |
m |
: . |
vs.
"" , .
- "/(.*at)/" => The fat cat sat on the mat.
"" , ?. .
- "/(.*?at)/" => The fat cat sat on the mat.