-1

I am trying to find an element by Xpath, Something like:

.//*[@id='images__row__94c744c1-dc7e-4c04-a78a-0f34d175f10f']/td[7]/div/a[1]

How can I capture the tags with regex like:

images__row__([A-Z0-9]{8}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{4}-[A-Z0-9]{12}). 
ScottJShea
  • 7,041
  • 11
  • 44
  • 67
  • Possible duplicate http://stackoverflow.com/questions/405060/can-i-use-a-regex-in-an-xpath-expression – dotoree Mar 03 '12 at 17:40
  • Welcome to StackOverflow! Check out the [Markdown Editing Help](http://stackoverflow.com/editing-help) - you may want to improve the formatting of your question so that it is a little clearer. – simont Mar 03 '12 at 17:40

1 Answers1

0

For RegEx support you need XPath 2.0 you expression would look like this:

//*[matches(@id, '^images_row_[a-z0-9]{8}-([a-z0-9]{4}-){3}[a-z0-9]{12}$')]/........

Murray McDonald
  • 631
  • 4
  • 5