regex
Character Classes
\c Control character
\s White space
\S Not white space
\d Digit
\D Not digit
\w Word
\W Not word
\x Hexadecimal digit
\O Octal digit
case insensitive search
/string/i
Match urls
/* eslint-disable no-useless-escape */
const protocol = '^(http(s)?(:\/\/))?(www\.)?'
const domain = '[a-zA-Z0-9-_\.]+'
const tld = '(\.[a-zA-Z0-9]{2,})'
const params = '([-a-zA-Z0-9:%_\+.~#?&//=]*)'
const qs = '\?.*$'
/* eslint-enable no-useless-escape */