-1

I have links like that:

 <image xlink:href="/fu/files/ws/31rmeec0ccusmqdh9uacsnu081/client/29/preview/delete.png" id="svg_131" height="24" width="24" y="64.8294" x="96.85564"/>

what is the best way to obtain only urls? /fu/files/ws/31rmeec0ccusmqdh9uacsnu081/client/29/preview/delete.png

Michoser
  • 85
  • 8
  • [Almost duplicate](http://stackoverflow.com/questions/15926142/regular-expression-for-finding-href-value-of-a-a-link) (it's missing the `xlink:` bit, and is targetted at an `a` tag) – James Thorpe Jun 17 '15 at 16:19
  • @user4703663 Assuming jQuery, and a javascript environment, yes, but since this question was using regex's and an unknown language/environment, it's not really an appropriate answer... – James Thorpe Jun 17 '15 at 16:20
  • @user4703663 It's trivially solvable using regex. There are downvotes because there is no apparent research effort into finding a suitable one. – James Thorpe Jun 17 '15 at 16:25

1 Answers1

1

Purely regex and considering a programming language or the file format:

/href=\"(.+?)\"/

See it work here: http://www.regexr.com/3b7kr

Please remember, that there are better ways to go about this if you're going through an XML document.

Duniyadnd
  • 4,013
  • 1
  • 22
  • 29