Page 1 of 1

Regular expression

Posted: Mon May 25, 2015 12:35 pm
by NewLearner
//div[#'FI_Cv_Exploratory_Inbound_SP,none:Carrier IATA Code:nkGlobalMap_941751663_(All)']/?/?/a[@innertext='(All)']

i need to use regular expression for this 941751663 will keep changing.. how to use regular exp for about path

Thanks

Re: Regular expression

Posted: Mon May 25, 2015 12:58 pm
by odklizec
Hi,

I'm afraid, it's not possible to use regular expressions (or variables) within unique IDs (ID starting with # sign). To be able to use reg. expressions (and/or variables) in your path, you will have to use another attribute (e.g. ID). So the path should look like this (use whatever/better regex you want):

Code: Select all

//div[@id~'(FI_Cv_Exploratory_Inbound_SP,none:Carrier IATA Code:nkGlobalMap_)(\d*)(_\(All\))']/?/?/a[@innertext='(All)']