18.01.2013 Views

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

VBScript Reference Manual for InduSoft Web Studio

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong> <strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong><br />

Character Classes<br />

Symbol Function<br />

[xyz] Match any one character enclosed in the character set.<br />

"[abc]" matches "a" in "plain".<br />

[a-z] Match any one character in the specified range. For example, "[a-z]"<br />

matches any lowercase alphabetic character in the range "a" through "z".<br />

"[a-e]" matches "b" in "basketball".<br />

[^xyz] Match any one character not enclosed in the character set.<br />

"[^a-e]" matches "s" in "basketball".<br />

[^m-z] Matches any character not in the specified range. For example, "[m-z]"<br />

matches any character not in the range "m" through "z".<br />

. Match any single character except \n (newline).<br />

\w Match any word character including underscore. Equivalent to [a-zA-Z_0-<br />

9].<br />

\W Match any non-word character. Equivalent to [^a-zA-Z_0-9].<br />

\d Match any digit. Equivalent to [0-9].<br />

\D Match any non-digit. Equivalent to [^0-9].<br />

\s Match any space character (e.g. space, tab, <strong>for</strong>m-feed, etc). Equivalent to<br />

[ \t\r\n\v\f].<br />

\S Match any non-space character. Equivalent to [^ \t\r\n\v\f].<br />

Repetition<br />

Symbol Function<br />

{n} Match exactly n occurrences of a regular expression. n must be a nonnegative<br />

integer. "\d{5}" matches 5 digits. For example, "o{2}" does not<br />

match the "o" in "Bob," but matches the first two o's in "foooood".<br />

(n,} Match n or more occurrences of a regular expression. n must be a nonnegative<br />

integer. "\s{2,}" matches at least 2 space characters. For<br />

example, "o{2,}" does not match the "o" in "Bob" and matches all the o's in<br />

"foooood." "o{1,}" is equivalent to "o+". "o{0,}" is equivalent to "o*"<br />

{n,m} Matches n to m number of occurrences of a regular expression. n and m<br />

must be non-negative integers. "\d{2,3}" matches at least 2 but no more<br />

than 3 digits. For example, "o{1,3}" matches the first three o's in<br />

"fooooood." "o{0,1}" is equivalent to "o?".<br />

? Match zero or one occurrences. Equivalent to {0,1}.<br />

"a\s?b" matches "ab" or "a b"<br />

"a?ve?" matches the "ve" in "never"<br />

* Match zero or more occurrences. Equivalent to {0,}.<br />

+ Match one or more occurrences. Equivalent to {1,}.<br />

\num Matches num, where num is a positive integer. A reference back to<br />

remembered matches. For example, "(.)\1" matches two consecutive<br />

identical characters.<br />

<strong>InduSoft</strong>, Ltd. 207

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!