You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
regex=/hello/;// looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex=/hello/i;// looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex=/hello/g;// looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex=/h.llo/;// the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex=/h.*llo/;// the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
/* shorthand character classes */
regex=/\d/;// matches any digit
regex=/\D/;// matches any non-digit
regex=/\w/;// matches any word character (a-z, A-Z, 0-9, _)
regex=/\W/;// matches any non-word character
regex=/\s/;// matches any white space character (\r (carriage return),\n (new line), \t (tab), \f (form feed))
regex=/\S/;// matches any non-white space character
/* specific characters */
regex=/[aeiou]/;// matches any character in square brackets
regex=/[ck]atherine/;// matches catherine or katherine
regex=/[^aeiou]/;// matches anything except the characters in square brackets
/* character ranges */
regex=/[a-z]/;// matches all lowercase letters
regex=/[A-Z]/;// matches all uppercase letters
regex=/[e-l]/;// matches lowercase letters e to l (inclusive)
regex=/[F-P]/;// matches all uppercase letters F to P (inclusive)
regex=/[0-9]/;// matches all digits
regex=/[5-9]/;// matches any digit from 5 to 9 (inclusive)
regex=/[a-zA-Z]/;// matches all lowercase and uppercase letters