Re: quick GREP question

This WebDNA talk-list message is from

2001


It keeps the original formatting.
numero = 39501
interpreted = N
texte = Steven Jarvis wrote: > > I know jack about grep, though I'm planning to learn it. I *think* it's what > I want to use in this situation, but I'm open to any other options, too.Get Mastering Regular Expressions from O'Reilly (ISBN 1-56592-257-2). Ignore all of the discussion of Perl extensions to regex engines (it will just make you jealous ;~) since the WebCat grep is pretty basic.> > I have to format some stories with WebCat and export them to a text file, > and I need to cut some HTML tags and their contents out of stories if they > are present. > Can I call your attention to the following context which is designed specifically for your problem: http://betadoc.smithmicro.com/RemoveHTMLContext.htmlIn general, you cannot use [grep] to always strip out markup tags, due to line breaks and nesting. You really need to have a simple state machine to correctly parse nested HTML tags; if you can make certain assumptions about your tags, you can deal with it with grep, but you need to be very careful.HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. why start a new thread the official way, --- WAS: Re: [WebDNA] Quick grep question (John Butler 2009)
  2. Re: [WebDNA] Quick grep question (Marc Thompson 2009)
  3. Re: [WebDNA] Quick grep question ("Dan Strong" 2009)
  4. Re: [WebDNA] Quick grep question (Donovan Brooke 2009)
  5. Re: [WebDNA] Quick grep question (Marc Thompson 2009)
  6. Re: [WebDNA] Quick grep question (Donovan Brooke 2009)
  7. Re: [WebDNA] Quick grep question (Kenneth Grome 2009)
  8. Re: [WebDNA] Quick grep question (Patrick McCormick 2009)
  9. Re: [WebDNA] Quick grep question (Marc Thompson 2009)
  10. Re: [WebDNA] Quick grep question (Kenneth Grome 2009)
  11. [WebDNA] Quick grep question (Patrick McCormick 2009)
  12. Re: [WebDNA] Quick Grep question (Govinda 2009)
  13. Re: [WebDNA] Quick Grep question (Steve Craig 2009)
  14. Re: [WebDNA] Quick Grep question (Toby Cox 2009)
  15. Re: [WebDNA] Quick Grep question (Toby Cox 2009)
  16. Re: [WebDNA] Quick Grep question (William DeVaul 2009)
  17. Re: [WebDNA] Quick Grep question (Steve Craig 2009)
  18. Re: [WebDNA] Quick Grep question (Toby Cox 2009)
  19. [WebDNA] Quick Grep question (Steve Craig 2009)
  20. Re: quick GREP question (Steven Jarvis 2001)
  21. Re: quick GREP question (John Peacock 2001)
  22. Re: quick GREP question (Maurice Rickard 2001)
  23. Re: quick GREP question (Kimberly Ingram 2001)
  24. Re: quick GREP question (Maurice Rickard 2001)
  25. Re: quick GREP question (Kimberly Ingram 2001)
  26. quick GREP question (Steven Jarvis 2001)
Steven Jarvis wrote: > > I know jack about grep, though I'm planning to learn it. I *think* it's what > I want to use in this situation, but I'm open to any other options, too.Get Mastering Regular Expressions from O'Reilly (ISBN 1-56592-257-2). Ignore all of the discussion of Perl extensions to regex engines (it will just make you jealous ;~) since the WebCat grep is pretty basic.> > I have to format some stories with WebCat and export them to a text file, > and I need to cut some HTML tags and their contents out of stories if they > are present. > Can I call your attention to the following context which is designed specifically for your problem: http://betadoc.smithmicro.com/RemoveHTMLContext.htmlIn general, you cannot use [grep] to always strip out markup tags, due to line breaks and nesting. You really need to have a simple state machine to correctly parse nested HTML tags; if you can make certain assumptions about your tags, you can deal with it with grep, but you need to be very careful.HTHJohn-- John Peacock Director of Information Research and Technology Rowman & Littlefield Publishing Group 4720 Boston Way Lanham, MD 20706 301-459-3366 x.5010 fax 301-429-5747------------------------------------------------------------- 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://search.smithmicro.com/ John Peacock

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

[ShowNext] feature in 2.0 (1997) still having shipCost.db Problem (1997) Trigger Bug? (2000) Excluding orders from WebMerchant processing (1998) WebCat2 - [format thousands] (1997) MSSQL - ODBC - OSX (2005) WebCatalog-NT?'s (1996) WebCat2_Mac RETURNs in .db (1997) WebDNA vs SQL ? (2002) Here we go again... was: DDEConnect not working (2006) Help! WebCat2 bug (Ben's input) (1997) [BULK] [WebDNA] [BULK] Console / WebDNA no connection to module (2011) Append User DB? (2000) Great product and great job ! (1997) Non-Cart Files in Shopping Cart Folder (1997) errormessages.db (1997) emailer (1997) [WebDNA] What's the next step? (2015) problems with 2 tags shakur (1997) 3+ Levels of Navigation (2006)