- Published on
Regex
| 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 |
Examples
foo must appear anywhere and baz must appear anywhere, not necessarily in that order.
(?=.*foo)(?=.*baz)