How to use Reg.Exp for Dynamic page
I want o use Reg.Exp for Dynamic changing page name.
From ObjRepository I tried to use !Pagename.* (like winrunner) in RegExp box But still not working.
Ex .Page name is Main2176_1127982509
want to use "Main" only.
Re: How to use Reg.Exp for Dynamic page
Use the below code
Function RegExpTest(patrn, strng)
Dim regEx, Match, Matches ' Create variable.
Set regEx = New RegExp ' Create a regular expression.
regEx.Pattern = patrn ' Set pattern.
regEx.IgnoreCase = True ' Set case insensitivity.
regEx.Global = True ' Set global applicability.
RegExpTest = regEx.Test(strng) ' Execute search.
Problem with RegExp is that is does not tell whether the whole string complies with the regular expression or only a sub part of it complies. So we need to add code to check for the exact match using the execute method. If this does not solve your purpose i can give you code related to that also