Konica Minolta Digital StoreFront User Manual

Page 125

Advertising
background image

Platform Settings

125

Character Class

Description

.

Characters other than . $ ^ { [ ( > ) * + ? \ match themselves.

[aeiou]

Matches any single character included in the specified set of characters,
in this case the a, e, i, o or u.

[0-9a-fA-F]

Use of a hyphen (–) allows specification of contiguous character ranges,
0 to 9, a to f and A to F.

\w

Matches any non-word character. \W is equivalent to [^a-zA-Z_0-9].

\s

Matches any white-space character. \s is equivalent to [ \f\n\r\t\v].

\S

Matches any non-white-space character. \S is equivalent to [^
\f\n\r\t\v].

\d

Matches any decimal digit. \d is equivalent to [0-9].

\D

Matches any nondigit. \D is equivalent to [^0-9].

Quantifiers add optional quantity data to a regular expression. A quantifier expression applies to the
character, group, or character class that immediately precedes it. The .NET Framework regular
expressions support minimal matching (“lazy”) quantifiers.

The following table describes the metacharacters that affect matching quantity.

Quantifier

Description

*

Specifies zero or more matches; for example, \w* or (abc)*. Equivalent
to {0,}.

+

Specifies one or more matches; for example, \w+ or (abc)+. Equivalent
to {1,}.

?

Specifies zero or one matches; for example, \w? or (abc)?. Equivalent
to {0,1}.

{n}

Specifies exactly n matches; for example, (pizza){2}.

{n,}

Specifies at least n matches; for example, (abc){2,}.

{n,m}

Specifies at least n, but no more than m, matches.

*?

Specifies the first match that consumes as few repeats as possible
(equivalent to lazy *).

+?

Specifies as few repeats as possible, but at least one (equivalent to lazy
+).

??

Specifies zero repeats if possible, or one (lazy ?).

{n}?

Equivalent to {n} (lazy {n}).

{n,}?

Specifies as few repeats as possible, but at least n (lazy {n,}).

Advertising