Negative Character Set
Learn about the anti of the character set to create a more precise RegEx.
Character range
Recall the RegEx you wrote in the previous problem /98[12][0123456789]/g
. Consider the case when you need to match huge integers or alphabets. Writing all the alphabets one by one in a character set would be very tedious. As a solution, another unique character, the hyphen"-"
, is used to express the range. Instead of writing digits or alphabets one by one, you can use this range of characters.
Get hands-on with 1200+ tech skills courses.