I want to use a regular expression like the following: "*[\s|\w]*" + x +"[\s|\w]*\" + y + "*[\s|\w]*\" + y + "*[\s|\w]*" where x and y and varaiblae names and their value changes everytime. For some reason this gives me an Invalid Token error. Can I use variables in a regular Expression? thanks a lot