Re: [WebDNA] Quick grep question

This WebDNA talk-list message is from

2009


It keeps the original formatting.
numero = 103381
interpreted = N
texte = Marc Thompson wrote: > This works too and is a bit shorter, but I like Donovan's better. > > [math][countwords delimiter=%20][T_words][/countwords]-1[/math] > > That's the beauty of WebDNA, there's more than one way to skin a cat. > (Not that I would ever do that!) > > Marc > > Donovan Brooke wrote: >> Patrick McCormick wrote: >>> Does anyone have a quick [grep] to count the number of spaces in a string? >> >> Patrick!, Start hitting "compose" or "new post" when posting a *new* >> post!! ;-) >> >> >> [countchars][grep search=[^ ]&replace=][T_words][/grep][/countchars] >> >> >> Donovan I love a good community cat skinning session... ;-) Unfortunately, WebDNA's delimiter param (in both listwords and countwords) does not work in quite the way you want it to. For example, the above will fail in: [text]T_words=this is a string of text with spaces. Now to count them[/text] (which contains multiple spaces between "string" and "of".) Donovan -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** 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)
Marc Thompson wrote: > This works too and is a bit shorter, but I like Donovan's better. > > [math][countwords delimiter=%20][T_words][/countwords]-1[/math] > > That's the beauty of WebDNA, there's more than one way to skin a cat. > (Not that I would ever do that!) > > Marc > > Donovan Brooke wrote: >> Patrick McCormick wrote: >>> Does anyone have a quick [grep] to count the number of spaces in a string? >> >> Patrick!, Start hitting "compose" or "new post" when posting a *new* >> post!! ;-) >> >> >> [countchars][grep search=[^ ]&replace=][T_words][/grep][/countchars] >> >> >> Donovan I love a good community cat skinning session... ;-) Unfortunately, WebDNA's delimiter param (in both listwords and countwords) does not work in quite the way you want it to. For example, the above will fail in: [text]T_words=this is a string of text with spaces. Now to count them[/text] (which contains multiple spaces between "string" and "of".) Donovan -- Donovan Brooke WebDNA Software Corporation http://www.webdna.us **[Square Bracket Utopia]** Donovan Brooke

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:

RAM variables (1997) Too many lines too add in one go (2003) changing prices in cart (1997) [WebDNA] plupload ? (2012) Serious bug writing to a database ... (2002) Running 2 two WebCatalog.acgi's (1996) hidden databases (2000) find with exceptions (1997) using showpage and showcart commands (1996) WebCat2 - Getting to the browser's username/password data (1997) Database changes (1998) Checking for @ sign (2006) [WebDNA] Windows WebDNA Editor (2009) can WC render sites out? (1997) Exclamation point (1997) AD Error Msg (1997) Hello??? (1997) Extended [ConvertChars] (1997) emailer settings and control questions (1997) Members register & gain access system (1998)