March 1st, 2003, 08:00 PM
Extract a URL from a string
I am trying find a way to extract a url from <a href="url">. I was thinking of using String.matches(regex), but I don't kow what to set as the regex. Any Ideas?
March 2nd, 2003, 11:36 PM
I know for a fact that the php forum has some regex/url posts in it, cause I have replied to more than one myself. Do a search and you should find some regular expressions that can extract a url from a link tag.
March 3rd, 2003, 03:00 PM
why not load the A element as a Node using the xml library of choice? I recommend dom4j, it is certainly the fastest.dom4j
- Chris of Custom Fit Technology
Access to MySQL Conversion Tool,
Visual XSLT Conversion Tool