>i'll try again,
>
>why does
> put replacetext(y,"<FONT.+>$",tab) into y
>
>not work at all
I'll step out on a limb here, anyone can feel free to saw it off if
your knowledge of MetaCard grep is better than mine.
The key issue here is that MetaCard's grep function is "greedy" what
that means is that .* or .+ will grab as much text as they can and
still get a match, _not_ as little. So:
replacetext(y,"<FONT.+>$",tab) will work only if the last character of y is ">"
>and
>
> put replacetext(y,"<FONT.+>.*$",tab) into y
>
>replace ALL the text from the first font tag to the end of the file?
Because the text starts matching at the first instance of "<FONT"
then the ".+" grabs everything up to the very last ">"
then the ">" grabs the last ">"
and the ".*" grabs everything from there to the end of the string.
>
>and
> put replacetext(y,"<font.*[^<]>",tab) into y
>still replace all the text to the end even though it's not supposed to go
>beyond one tag...
Again, "<font" grabs the first instance of "<font"
the ".*" grabs everything from there to the last instance of ">"
where the character before it isn't "<"
the "[^<]" grabs the one character before the ">" that isn't a "<"
and the ">" grabs the ">"
try "<font[^>]*>" instead. This says:
find "<font" followed by as much text as you can grab, so long as it
doesn't contain ">" and then the ">"
>
>i also tried with <td.*[^<]+> and <td.*^[<]>
>
>The strangest part is that I even separated EVERY tag with returns so that
>each is sitting on one line.
>This means that the "$" is not respecting something... I also tried with
>escaping the character '\>'.
>
>This is another one of these computer witchcraft things im sure...
>
I don't know how MetaCard handles the $
Regards,
Geoff
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.