Hi all,
I wanted to add automatic parsing of URL's to a small forum I wrote, but I’ve hit a wall, a lot of the old forum posts use simple bbcode, which works - but now I’m trying to write a regular expression to automatically detect a straight URL, also at the same time deal with the current bbcode links, so if [url] parts exists, catch them with the regular expression and drop them from the results to leave the URL.
Currently I have this as my regular expression '(?:[url])?(http://[s]*)(?:[/url])?' but I cannot seem to make any further progress, I know now that 's' is causing a problem and grabbing the rest of the line up to a white space, but this afternoon I’ve been tweaking the regular expression to the best of my understanding of regular expressions and still cannot get it working.
Thanks in advance for any advice or help.