Skip to main content
Inspiring
March 19, 2008
Question

Parse text and hyperlink

  • March 19, 2008
  • 1 reply
  • 960 views
I posted this previously but did not find a solution. I have found REGEX in the past that might do it, but can't find the links to them anymore, one was on houseoffusion.com but I just can't locate it.

What I want to do is take some text from a query and then parse it for any URL's, namely anything that begins with HTTP:// the ending character being a space which would be present after the URL.

I don't know anything else about the actual link as they will all be different, but I can say that the text will potentially have more than one link within it.

Does anybody have a solution to hand? Or can you point me to a suitable solution? Maybe one of the regex?

Thanks

Mark
This topic has been closed for replies.

1 reply

Inspiring
March 19, 2008
ACS LLC wrote:
>
> Does anybody have a solution to hand? Or can you point me to a suitable
> solution? Maybe one of the regex?
>
> Thanks
>
> Mark
>


I think this should get you close.

" HTTP://.*? "
^ [ ]ending space character
^ [?]non-gready - i.e. match the shortest possible string.
^
  • match one or more of the previous character.
    ^ [.]match any character
    ^ Match the string " HTTP://"

  • ACS LLCAuthor
    Inspiring
    March 19, 2008
    how would this be implemented into a CF command?? I'm not too familiar with this particular process