AJAX - The Complete Reference

(avery) #1

584 Part IV: Appendixes


However, this comment form is not allowed within actual script and is solely supported as
the first line within a <script> tag. In this manner they are used as a browser workaround
to mask script from nonsupporting user-agents.

Character Meaning
* Match previous item zero or more times

+ Match previous item one time or more
? Match previous item zero or one time
{m, n} Match previous item at minimum m times, but no more than n times

{m, } Match previous item m or more times
{m} Match previous item exactly m times

TABLE A-22 Regular Expression Repetition Quantifiers

Character Meaning

[chars] Any one character indicated either explicitly or as a range between the
brackets
[^chars] Any one character not between the brackets represented explicitly or as a
range

. Any character except newline
\w Any word character; same as [a-zA-Z0-9_]


\W Any nonword character; same as [^a-zA-Z0-9_]
\s Any whitespace character; same as [ \t\n\r\f\v]
\S Any nonwhitespace character; same as [^ \t\n\r\f\v]
\d Any digit; same as [0-9]

\D Any nondigit; same as [^0-9]
\b A word boundary; the empty “space” between a \w and \W
\B A word nonboundary; the empty “space” between word characters

[\b] A backspace character

TABLE A-23 Regular Expression Character Classes
Free download pdf