Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

character classes in regex

//Character classes are one of the primary means of “grouping” characters 
//in a regex pattern without necessarily enforcing an order to those characters.

[abc]	Includes any of the contained characters
[^abc]	Excludes all of the contained characters
[a-z]	Includes any of the contained characters across a range
.	    Any character except newline
w	    Any word character (alphanumeric and underscore)
d	    Any digit [0-9]
s	    Whitespace (spaces, tabs, line breaks)
 
PREVIOUS NEXT
Tagged: #character #classes #regex
ADD COMMENT
Topic
Name
4+9 =