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

[REBOL] Re: Help required for a little parsing problem

From: chaz:innocent at: 19-Nov-2000 1:43

parse post [ any [ to "[url]" url_start: thru "[url]" copy href to "[/url]" thru "[/url]" url_end: (change/part url_start compose [("<a href = ^"") (href) ("^" target = ^"_blank^">") (href) ("</a>")] url_end) ] ] Go through the post. Move to the beginning of the '[url] tag and save that position into the word 'url_start copy the value of the url into 'href move to the end of the '[/url] tag and save that position in 'url_end Replace everything between 'url_start and 'url_end with a new string composed of three strings and two instances of the value of the word 'href ('compose concatenates and evaluates) Please email me off-list with the Perl equivalent. chaz P.S. Thanks to Gabriele for his Expression Evaluator. At 04:41 PM 11/18/00 -0000, you wrote: