Forum Moderators: open

Message Too Old, No Replies

Regex Question

         

sgietz

5:32 pm on Sep 22, 2009 (gmt 0)

10+ Year Member



Not sure where else to post this ...

I'm trying to create a regex pattern that matches URLs (I got that) but not specially formatted URLs. Right now I can parse URLs and turn them into HTML links on the page with the URL as the text. I want to be able to insert links with custom text such as

[ url=http://www.webmasterworld.com]Cool site for webmasters[/ url].

So far I have failed, because the regex that catches regular links is also partially parsing the above format with ugly results.

Any pointers? What regex do the message boards use for this purpose?

Thanks!

sgietz

7:19 pm on Sep 22, 2009 (gmt 0)

10+ Year Member



This is absurd. As soon as I post a question, I figure it out myself. It rarely fails.

:)

JAB Creations

2:58 pm on Sep 25, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Haha...I do that a lot too. ;)

- John