Regex - Anton-L-GitHub/Learning GitHub Wiki

Symbols

. Any character (Except new line)
\d Digit (0-9)
\D Not Digit
\w Word Character (a-z, A-Z, 0-9, _)
\W Not a Word Character
\s Whitespace (space, tab, newline)
\S Not Whitespace

Anchor Tags

\b Word Boundary
\B Not a Word Boundary
^ Start of line
$ End of line

Samples

^-?\d+(,\d+)*(.\d+(e\d+)?)?$ Matching decimal numbers (3.1456, -255.35, 126, 1.9e10, 123,140.00)

Examples

Exercise - https://regexone.com/ - https://regexcrossword.com/

Tester - https://regex101.com/

⚠️ **GitHub.com Fallback** ⚠️