Export (0) Print
Expand All
1 out of 2 rated this helpful - Rate this topic

Regular Expressions

Unless you have previously used regular expressions, the term may be unfamiliar to you. However, you have undoubtedly used some regular expression concepts outside the area of scripting.

For example, you most likely use the ? and * wildcard characters to find files on your hard disk. The ? wildcard character matches a single character in a file name, while the * wildcard character matches zero or more characters. A pattern such as data?.dat would find the following files:

data1.dat

data2.dat

datax.dat

dataN.dat

Using the * character instead of the ? character expands the number of found files. data*.dat matches all of the following:

data.dat

data1.dat

data2.dat

data12.dat

datax.dat

dataXYZ.dat

While this method of searching is useful, it is also limited. The ability of the ? and * wildcard characters introduces the concept behind regular expressions, but regular expressions are more powerful and flexible.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.