Welcome to my ASP Code Website

Regular Expression Pattern Matching

Regular Expressions let you do pattern matching in VBScript and ASP. In essence, you can validate that any input string matches up to your required letter/number settings.

What you can do is specify exactly what characters should be found in each position. So if you wanted to only accept values of

ID1 through ID9, you could set your pattern to be


If you needed a value to start with SUBJ but have any characters after that point, you could do


You can also use {#} to say you want # of something. So you can do


if you want to see 9 digits in a row. So a pattern for a social security number would be


To learn how to use these patterns in your code, be sure to read Using Regular Expressions in ASP Coding!

ASP Basic Concepts