Character classes

A character class is used to match a single character to a set of possible characters. A character class is denoted using square brackets ([ ]).

For example, a character class may contain each of the vowels:

'get' -match 'g[aeiou]t' 
'got' -match 'g[aeiou]' 

Within a character class, the special or reserved characters are as follows:

  • -: Used to define a range
  • : Escape character
  • ^: Negates the character class
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.12.161.165