Regular Expressions: Using a variable as a RegExp

Hi All,
I am using RegExp to search for character sequences within strings. I was wondering if/what is the proper way to use a string stored in a variable as a regular expression. For example:


[LEFT][COLOR=#993300]var[/COLOR] someString:[COLOR=#993300]String[/COLOR] = [COLOR=#0000ff]"blah";[/COLOR]
[COLOR=#993300]var[/COLOR] expPattern:RegExp = [COLOR=#0000ff]"/"[/COLOR]+someString+[COLOR=#0000ff]"/"[/COLOR]; [COLOR=#f000f0]*//Waahhhh! I really want this to work!!!! *[/COLOR][/LEFT]

Any help greatly appreciated. Otherwise, I think I’ll have to use another string manipulation tool to search for the sequence. I think that RegExp might be the easiest solution. Hopefully my syntax is incorrect.
Thanks,
MadHat