IT. Expert System.

REGEX

Character Classes


Character Classes or Character Sets

Character Description
[
(opening square bracket)
Starts a character class. A character class matches a single character out of all the possibilities offered by the character class. Inside a character class, different rules apply. The rules in this section are only valid inside character classes. The rules outside this section are not valid in character classes, except for a few character escapes that are indicated with "can be used inside character classes".
Any character
except ^-]\ add that character to the possible matches for the character class
All characters except the listed special characters
\
(backslash) followed by any of ^-]\
Escapes special characters to suppress their special meaning
-
(hyphen) except immediately after the opening [
Specifies a range of characters when placed immediately after opening [

Otherwise, specifies a hyphen if placed immediately after the opening [
^
(caret) immediately after the opening [
Negates the character class when placed immediately after opening [, causing it to match a single character not listed in the character class

Otherwise, specifies a caret if placed anywhere except after the opening [
\d matches any decimal digit

same as [0123456789] or [0-9]

match("\d", "9") => true
\D matches any non-decimal digit (see \d)
match("\D", "9") => false
\s matches any whitespace character (space, tab, line break)
match("\s", " ") => true
\S matches any non-whitespace character (see \s)
match("\S", " ") => false
\w matches any word character (letter, number, underscore)

match("\w", "x") => true
\W matches any non-word character (see \w)
match("\W", "x") => false
[\b] matches the backspace character when specified inside a character class


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 1250 / . Delta: 0.02372 с