Regex Library (Regular Expressions)
Regex Library (Regular Expressions)
Expressions)
Introduction:
https://regexr.com/
💡 Syntax:
/regular expression/flags
We can stack multiple flags like /text/gi This way we can stack global
and case insensitive together.
/e+/g //This search for at least one ‘e’, and also searches for multiple in a
row
/e+a?/g//This ? makes the search for ‘a’ optional, anything behind the ?
is considered as optional
💡 /\w/g
alphabet
This matches any alphabet \W This matches anything that is not a