Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Help required for a little parsing problem

From: nigelb::awardsplus::co::uk at: 18-Nov-2000 16:41

Hi I'm writing an add-on for a bulletin board and need a bit of help in writing some elegant code to do the following: a variable has the content of a post -eg: post: "This is a post - Perl is good [url]http://www.perl.com[/url], Rebol is better [url]http://www.rebol.com[/url]" when this is posted to the board the text between the [url] and [/url] ends up as a link. So what I need to do is change the above text to: This is a post - Perl is good <a href = ^ http://www.perl.com^" target ^"_blank^">http://www.perl.com</a>, Rebol is better <a href=^"http://www.rebol.com^" target=^"_blank^">http://www.rebol.com</a>" Whilst I could probably write a (long) solution I'm sure there must be an elegant couple of line Rebol solution - one problem is that there may be any number of links in the post. Any suggestions? Thanks in advance Nigel