Update regex

This commit is contained in:
Marcus Kammer 2022-05-20 09:31:23 +02:00
parent 1bd7627414
commit caa9d6ff09

View file

@ -79,4 +79,12 @@
("(a-z)" "a, - and z")
("(\s+|,)" "spaces or a comma")
("#\w+" "find hashtags")
("([@|#]\w+)" "matches both mentions (@) and hashtags")))
("([@|#]\w+)" "matches both mentions (@) and hashtags")
("(^[a-zA-Z0-9_.+-]+@[a-zA-Z0-9-]+\.[a-zA-Z0-9-.]+$)" "email regex")
("-?\d+(\.\d*)?" "matching decimal numbers")
("(?:http|https|ftp|mailto|file|data|irc):\/\/[A-Za-z0-9\-]{0,63}(\.[A-Za-z0-9\-]{0,63})+(:\d{1,4})?\/*(\/*[A-Za-z0-9\-._]+\/*)*(\?.*)?(#.*)?" "matching urls")
("^\d{4}/(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])$" "matching dates yyyy/mm/dd")
("^(0[1-9]|1[0-2])/(0[1-9]|[12][0-9]|3[01])/\d{4}$" "matching dates mm/dd/yyyy")
("^(0[1-9]|[12][0-9]|3[01])/(0[1-9]|1[0-2])/\d{4}$" "matching dates dd/mm/yyyy")
("<.+>" "matching html")
("<\/?(?:p|a|b|img)(?: \/)?>" "matchig specific tags")))