Sep 08
Wendy Derzawiec why does this String_replaceRegExp work?
Sep 08, 2012; 16:25
Wendy Derzawiec
why does this String_replaceRegExp work?
Dear List,
I'm trying to re-publish an XML feed from a Google Sites announcements page. I'm hoping to strip most of the HTML from the feed, but keep some HTML like <i> and <b> and <a href>. I figure if I used a RegEx to do this, I could construct something that would strip out HTML tags that have more than one character.
this works, kind of:
(var 'mytext' = (String_replaceRegExp: $mytext, -Find='<[^/a][^>]+>', -Replace=''));
I am not sure WHY it works, but it gets rid of beginning tags that have more than one character (like div, dir, table, etc), while retaining the single character tags. But it also retains the end tags that have more than one character (ie </div>, </dir>, </table>, etc).
This doesn't seem to be a huge problem because without the beginning tags, the browser doesn't do anything with the end tags, but I'd rather not have such sloppy code.
Can any one explain to me why my RegExp is doing what it is doing, and how I might make it better? Thank you,
Wendy
#############################################################
This message is sent to you because you are subscribed to
the mailing list Lasso
Lasso@lists.lassosoft.com
To unsubscribe, E-mail to: <Lasso-unsubscribe@lists.lassosoft.com>
Send administrative queries to <Lasso-request@lists.lassosoft.com>
Sep 09
Fletcher Sandbeck Re: why does this String_replaceRegExp work?
Sep 09, 2012; 08:06
Fletcher Sandbeck
Re: why does this String_replaceRegExp work?
Sep 09
Fletcher Sandbeck Re: why does this String_replaceRegExp work?
Sep 09, 2012; 08:41
Fletcher Sandbeck
Re: why does this String_replaceRegExp work?
Sep 09
Ke Carlton Re: why does this String_replaceRegExp work?
Sep 09, 2012; 18:12
Ke Carlton
Re: why does this String_replaceRegExp work?
Sep 10
James Harvard Re: why does this String_replaceRegExp work?
Sep 10, 2012; 17:59
James Harvard
Re: why does this String_replaceRegExp work?
Sep 10
Wendy Derzawiec Re: why does this String_replaceRegExp work?
Sep 10, 2012; 18:14
Wendy Derzawiec
Re: why does this String_replaceRegExp work?