Skip to content Skip to sidebar Skip to footer

How To Search For Exact Text Using Xpath And Regex?

An html paragraph contains the text Join {text} Now, or Join {text} Today. The xpath locator I created for this does not work. How do I make it work ? //p[matches(text(), 'Join.*/^

Solution 1:

I created one on the http://regexr.com/. Is stayed like this: \bJoin.*(\bToday|\bNow). Try it.


Post a Comment for "How To Search For Exact Text Using Xpath And Regex?"