Regex
Hi,
I was trying to implement something similar to the following https://support.smartbear.com/testcomplete/docs/scripting/regular-expressions.html
var regEx3 = /;(\r\n)+function/g;
var ReplacementLines = ";\r\n\r\n//A helper routine\r\nfunction";
var test1 = "function Foo(Param1)";
var test2 = test1.replace(regEx3,ReplacementLines);
but it does not give me the result as expected.
var test = "class=organizationAgentGridInfoRightColumn_Text12345";
var regEx = /<=organizationAgentGridInfoRightColumn_Text>.*/gi;
test = aqString.Replace(test,regEx,"abc");
Not sure what I am doing wrong. Is my regex wrong?
Hi aa1,
If you compare web pages, I recommend that you refer to the following article to learn more about the Web Comparison Checkpoint:
https://support.smartbear.com/testcomplete/docs/testing-with/checkpoints/web-comparison/about.html
This is a built-in TestComplete's feature that may help you.
If you are looking for something else, please take a look at the following article explaining how to use regular expressions:
https://support.smartbear.com/testcomplete/docs/scripting/regular-expressions.html