# URL in String

**URL:** <https://forum.kirupa.com/t/url-in-string/297411>\
**Category:** flash\
**Created:** [October 1, 2009, 5:14pm UTC](https://forum.kirupa.com/t/url-in-string/297411 "2009-10-01T17:14:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![themethods](https://avatars.discourse-cdn.com/v4/letter/t/dfb087/32.png) [@themethods](https://forum.kirupa.com/u/themethods)\
**Post date:** [October 1, 2009, 5:14pm UTC](https://forum.kirupa.com/t/url-in-string/297411/1 "2009-10-01T17:14:59Z")

</div>

I am trying to pull a link (or links) out of a text string. So if I had something like this:

```auto
textString = "This a text string that includes a link http://www.actionscript.org and I want to detect the link or even detect this link http://www.adobe.com"

```

I would like to be able to find the links in the text string and replace them with a single word or words that I would format to be an HTML link within a text box.

I’ve had some luck with string.indexOf, but I’m not sure how to detect the end of the link where the remaining text begins that I don’t want linked.

Any ideas?
