Try org.apache.xpath.CachedXPathAPI
or
org.apache.xpath.XPathAPI.
Both will allow you to specify an XPath
string and it will return what you have asked for. This may or may not be what you wanted.
XPath supports XPath strings, not Regular Expressions. There is a learning curve associated with XPath.
Dave Patterson