! Content:Brackets []、Braces {}、Peratheses ()
Brackets [] - Character Sets
With a “character class”, also called “character set”, you can tell the regex engine to match only one out of several characters. Simply place the characters you want to match between square brackets [].
參考來源
1 | re = /gr[ae]y/i => Must be an a or e |
Curly Braces {} - Quantifiers
curly braces are used by a quantifier with specific limits
1 | // the following are three different limits of [ l ] |
Peratheses () - Grouping
1 | re = /([0-9]X){3}/ => 3 times |