Using Regular Expressions

 

 

 

Pattern Matching

Table C-1

Description of Special Characters in Regular Expressions

 

 

 

 

 

To…

Use…

Example

 

 

 

 

 

Match any

.

To match a string

 

character

 

beginning with the

 

 

 

characters st, followed

 

 

 

by any character,

 

 

 

followed by ck, enter:

 

 

 

st.ck

 

 

 

In response, SoftBench

 

 

 

matches such strings as

 

 

 

stack or stocks. To

 

 

 

match a string that

 

 

 

includes a period, refer

 

 

 

to the description of the

 

 

 

backslash character (\).

 

 

 

 

 

Treat a special

\

Treats any special

 

character as a

 

character following it as

 

literal.

 

a literal character. For

 

 

 

example, to match a

 

 

 

string that includes a

 

 

 

period, such as st.,

 

 

 

enter:

 

 

 

st\.

 

 

 

 

Appendix C

355