You could use non-greedy regexes, but I agree that the linear scan is certainly faster.
To get the link working, you'd have to keep track of where you found the open-link, then as soon as you find a close-link you'll have to do some fancy replacing. It'd be nice to have but I agree the copy/pasting isn't too bad.
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
Quote: At present, it simply does a "replace all" of "[b]" to "<b>" and so on.
Instead of replace all of [b] to <b>, you could do replace all of [a]...[/a] to <a href="...">...</a>. Unless, of course, Nick meant that he does only one linear scan of the message, instead of uses multiple regular expressions on it.
David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone
Yeah someone asked about this a couple years ago I think. I believe Nick said he decided not to create a URL forum code because of fears that it could be exploited or abused by users.
The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).
To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.