Think Quality Think Process
Think Quality Think Process

QTP - vbscript Patterns Matchings...


Bookmark and Share


Posted on Tuesday, March 17, 2009 at 16:00 in Automation QC
Vb Script Help Patterns

Ø  These sets of patterns can be broken down into several categories and areas

o   Position Matching.

o   Literals.

o   Character Classes.

o   Repetition.

o   Alternation & Grouping.

o   Back references

 

Ø  Position Matching:

 

Ø  ^

o   Only match the beginning of a string.

o   "^A" matches first "A" in "An Arnold. “.

Ø  $

o   Only match the ending of a string.

o   "t$" matches the last "t" in "Promotional offer Letter in then list “.

Ø  \b

o   Matches any word boundary.

o   "al\b" matches "al" in "Promotional Offer. “

Ø  \B

o   Matches any non-word boundary.

 

Ø  Literals:

o   Literals can be taken to mean alphanumeric characters, ACSII, octal characters, hexadecimal characters, UNICODE, or special escaped characters.

\n

Matches a new line.

\f

Matches a form feed.

\r

Matches carriage return

\t

Matches horizontal tab.

\v

Matches vertical tab.

\?

Matches ?

\*

Matches *

\+

Matches +

\.

Matches .

\|

Matches | (pipe)

\{

Matches {

\}

Matches }

\\

Matches \

\]

Matches ]

\[

Matches [

\(

Matches (

\)

Matches )

\xxx

Matches the ASCII character expressed by the octal number xxx.

“\50" matches "(" or chr (40).

 

\xdd

Matches the ASCII character expressed by the hex number dd.

"\x28" matches "(" or chr (40). \}

 

\uxxxx

 

Matches the ASCII character expressed by the UNICODE xxxx.

"\u00A3" matches "£".

 


Last Page | Page 1 of 5 | Next Page

Recent Entries

- Test Estimation.....

Categories

- Automation QC
- QA
- General

RSS Feed

Subscribe

Add to Google Reader or Homepage

Add to Yahoo Reader or Homepage

Add to The Free Dictionary

Powered by FeedBurner

Custom Search
Locations of visitors to this page