Nicodemas
06-15-2006, 01:30 PM
Recently I've delved into a world of utter despair. The world of VBScript's regular expressions.
Can anyone here form a regular expression that can pluck out the word 'the' from a string using VBScript's RegExp object? Take for instance:
"The quick, brown fox jumped over the lazy dog."
I have tried. But as far as I know, the RegExp object doesn't let you look for entire words consisting of a solid string and exclude them.
I tried this: [^(T|t)he]
But that will knick any occurrence of T,t,h,e in the entire string. Using the previous string as an example, the expression would return:
"quick, brown fox jumpd ovr lazy dog"
Can anyone here form a regular expression that can pluck out the word 'the' from a string using VBScript's RegExp object? Take for instance:
"The quick, brown fox jumped over the lazy dog."
I have tried. But as far as I know, the RegExp object doesn't let you look for entire words consisting of a solid string and exclude them.
I tried this: [^(T|t)he]
But that will knick any occurrence of T,t,h,e in the entire string. Using the previous string as an example, the expression would return:
"quick, brown fox jumpd ovr lazy dog"