Shorthand character classes

A number of shorthand character classes are available. The following table shows each of these:

Shorthand

Description

Character class

d

Digit character

[0-9]

s

White space (space, tab, carriage return, new line, and form feed)

[ f]

w

Word character

[A-Za-z0-9_]

 

Each of these shorthand classes can be negated by capitalizing the letter. [^0-9] may be represented using D and S is for any character except white space, and W for any character except a word character.

..................Content has been hidden....................

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