Need help with XPath. I have such a XML:
<unaryExpression tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8">
<postfixExpression tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8">
<leftHandSideExpression tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8">
<newExpression tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8">
<memberExpression tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8">
<primaryExpression tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8">
<literal tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8">
<stringLiteral tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8">
<LITERAL tokenValue="'http://google.com'" tokenLine="1" tokenColumn="8"/>
</stringLiteral>
</literal>
</primaryExpression>
</memberExpression>
</newExpression>
</leftHandSideExpression>
</postfixExpression>
</unaryExpression>
I need to find the URL. I do it so.
//LITERAL[contains(@tokenValue, 'http://')]
How to use a regular expression to find url?
(http://|https://|ftp://)([a-z0-9]{1})((\.[a-z0-9-])|([a-z0-9-]))*\.([a-z]{2,4})(\/?)