Page 1 of 1
regular expression wildcard
Posted: Thu Aug 09, 2018 3:26 pm
by sstowe
I have an xpath for an item ?/?/ul/li/?/?/div[@innertext~'^\ needs\ your\ review\ and\ ap']
The word needs may sometimes be need if the number of things to which is referring is plural. I am not seeing any examples on the internet to specify variability or wildcard for this. Is this a simple regex that I am just not getting? Thanks.
Re: regular expression wildcard
Posted: Thu Aug 09, 2018 3:58 pm
by Stub
Maybe something like this:
need[s]?
I'm no regex expert, I just tried this on rubular.com very quickly as I'm about done for the day!
Re: regular expression wildcard
Posted: Thu Aug 09, 2018 4:21 pm
by sstowe
Thanks. Alas, no. The item is not found when the s is present. I will try rubular.com to flush it out.
Re: regular expression wildcard
Posted: Thu Aug 09, 2018 5:10 pm
by sstowe
needs? does the trick. Thanks.
Re: regular expression wildcard
Posted: Fri Aug 10, 2018 8:34 am
by Stub
Huzzah! Of course! Rushing at the end of the day there... I always seem to end up Rubular.com doing on my regex experimenting.
Re: regular expression wildcard
Posted: Fri Aug 10, 2018 9:29 am
by odklizec
Hi guys,
Are you aware there is a built-in regex editor in Studio (look under Tools)?
Re: regular expression wildcard
Posted: Fri Aug 10, 2018 2:20 pm
by sstowe
Not aware! Thanks! I Am Super Happy! Did I mention that I love Ranorex?
Re: regular expression wildcard
Posted: Tue Aug 14, 2018 8:44 am
by Stub
Nor was I! Blinkers on, I just go with the tool I usually use when formulating regex for my production code. A web browser is usually open so I defaulted to that. Next time I have Ranorex open I'll take a look, if I remember. Top tip, odklizec.