Regex
A sequence of characters that specifies a search pattern
Character | Description |
---|---|
\d |
Shorthand for [0-9] |
\w |
Word character ([A-Za-z0-9_] ) |
\s |
Whitespace character ([ \t\r\n\f] ) |
^ |
Start of line |
$ |
End of line |
?= |
Positive Lookahead |
Two conditions
foo
must appear anywhere and baz
must appear anywhere, not neccessarily in that order.
(?=.*foo)(?=.*baz)