VBS tutorial: introduction to regular expressions – regular expressions

Time:2022-5-4

regular expression

If you haven’t used regular expressions before, you may not be familiar with this term and concept. However, they are not as novel as you think.

Recall how you looked for files on your hard drive. Are you sure you will use it? And * characters to help find the file you are looking for.? Characters match a single character in the file name, while * matches one or more characters. One such as’ data ‘ Dat ‘mode can find the following files:

data1.dat

data2.dat

datax.dat

dataN.dat

If the * character is used instead of? Character, the number of files found will be expanded. ” data*. Dat ‘can match all of the following file names:

data.dat

data1.dat

data2.dat

data12.dat

datax.dat

dataXYZ.dat

Although this method of searching files is certainly useful, it is also very limited.? The limited capabilities of * and * wildcards can give you a concept of what regular expressions can do, but regular expressions are more powerful and flexible.