# Grabbing a URL via a Regular Expression (special cases)

**URL:** <https://forum.kirupa.com/t/grabbing-a-url-via-a-regular-expression-special-cases/285225>\
**Category:** flash\
**Created:** [March 28, 2009, 9:46pm UTC](https://forum.kirupa.com/t/grabbing-a-url-via-a-regular-expression-special-cases/285225 "2009-03-28T21:46:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Endoplasmic](https://avatars.discourse-cdn.com/v4/letter/e/e8c25b/32.png) [@Endoplasmic](https://forum.kirupa.com/u/Endoplasmic)\
**Post date:** [March 28, 2009, 9:46pm UTC](https://forum.kirupa.com/t/grabbing-a-url-via-a-regular-expression-special-cases/285225/1 "2009-03-28T21:46:44Z")

</div>

After 2 nights of _almost_ getting it I realized that Flash’s RegExp doesn’t support lookbehinds.

So I’m wondering if anyone could help point me in the right direction that is away from this wall I’m currently facing.

Here are the 3 scenarios:

1. [http://example.com](http://example.com)
2. \<a href=“[http://example.com](http://example.com)”\>[http://example.com](http://example.com)\</a\>
3. \<br\>\<br\>[http://example.com](http://example.com)\<br\>\<br\>

Basically what I want to happen is to ignore scenario #2. I know the solution, but I can’t seem to nail it. All that needs to happen is to select the http (and everything after that) as long as it’s not preceded by a [COLOR=Red]"\>[/COLOR] or [COLOR=Red]="[/COLOR], but since I don’t know a way for RegExp to look backwards, I’m sort of at a loss.

Here’s hoping that someone has run into this issue before 😃
