Can I use a Regex in an XPath expression?

Something like “.//div[@id='foo\d+]” to capture div tags with id=‘foo123’.

I’m using .NET, if that matters.

XPath 1.0 does not support regular expressions. Nonetheless, you have the following options: •Use an XPath 1.0 expression (note the starts-with() and translate() functions) like this:

			   [starts-with(@id, 'foo')
			   'foo' = translate(@id, '0123456789', '')
			   string-length(@id) > 3  

		[b]Use [[/b]](

		[b]Use[/b] [](