Ask a Question

Need a regular expression not to select a particular word


Need a regular expression not to select a particular word


I want a regular expression not to select a particular word

Ex: I have a string  "This is very great"

 now i dont want to select "very" from the that string.For that i want a regular expression

I am using TestComplete version 7.51 (VB Script)

Hi siddhardha,

First of all, please note that we provide support for AutomatedQA products, not for Microsoft regular expressions syntax used in VBScript and JScript. However, here is what you can try: take the entire string and just remove the problematic word from it. You can use the native Replace method to do this. Please see the following MSDN Library article for more information:

Also, you can find more information on regular expressions here:

Best regards,

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Esteemed Contributor

Something else that you can do.

My developer here made up a little .NET assembly that put some wrappers around the .NET regular expressions object that allows my to use groupings.  With that object, the following regular expression can give me back values based upon the groupings I put in the expressions...

.*"(?<column>.*)".* row (?<row>\d*) contains .*\((?<value>.*)\) that differs from .* \((?<stored>.*)\).

With that RegEx, I can reference the column, row, value, and stored groupings of the expression individually

GlobalRegEx.TestCompleteUtils.GetGroupValue(GlobalRegEx.CurrentMatch, 'row').OleValue;

Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Showing results for 
Search instead for 
Did you mean: