Re: Grepping to remove text & code
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 55807
interpreted = N
texte = Thanks Bill,It's kind of a hard one to explain. :)It's for a forum that I've built. People can reply to previous posts by "quoting" them, as in other message boards. On my message board, the original poster will leave a "report" that is a
with some information in it and then what they type for their notes shows beneath that report (table). I want that table stripped out if someone replies ("quotes") a previous post.So, the original post may look like this:[quote]Originally posted by: gjk:
...etc.....bunch of table data..... Rest of original post (what that person typed outside of the table[/quote]I added the [quote] variable so that it does some displaying as quoted text once it's submitted. I also have it append the comment, YOUR NOTES APPEAR NEXT at the bottom of the table, so that if a person edits their own post, they can see where that table stops and their notes start.I want to strip out that table should someone reply to a post by quoting.The opening table code always begins with:And the place to end the stripping is with that comment.All of this text is saved to a database in a variable called [notes]. So, if I could do something like this:[grep search= from: to: and replace=] [notes][/grep] (replace with nothing) that would be ideal. Note that I don't want to remove the first part of the [notes] information, which is "[quote]Originally posted by: gjk:
".Hope that makes sense. I'm thinking this is not possible, but thought I'd see if grep would somehow work.Thanks!GK-------------------------------------------------------------This message is sent to you because you are subscribed to the mailing list .To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/
Associated Messages, from the most recent to the oldest:
Thanks Bill,It's kind of a hard one to explain. :)It's for a forum that I've built. People can reply to previous posts by "quoting" them, as in other message boards. On my message board, the original poster will leave a "report" that is a with some information in it and then what they type for their notes shows beneath that report (table). I want that table stripped out if someone replies ("quotes") a previous post.So, the original post may look like this:[quote]Originally posted by: gjk:
...etc.....bunch of table data..... Rest of original post (what that person typed outside of the table[/quote]I added the [quote] variable so that it does some displaying as quoted text once it's submitted. I also have it append the comment, YOUR NOTES APPEAR NEXT at the bottom of the table, so that if a person edits their own post, they can see where that table stops and their notes start.I want to strip out that table should someone reply to a post by quoting.The opening table code always begins with: