Re: GetWords
This WebDNA talk-list message is from 2004
It keeps the original formatting.
numero = 60186
interpreted = N
texte = At 1:34 PM -0600 11/24/04, Clint Davis wrote:>I need to extract the first sentence out of a block of text. The sentence>will end with a period, exclamation point, or question mark followed by a>space. May be a job for [grep]. Any ideas?Here ya go:[text]ignorewords=no[/text][text]mySentence=[/text][listwords words=This is a sentence with 2.2 children. And this is another one.&delimiters= ][hideif [ignorewords]=yes][!]debug: [index]-[word]-
[/!] [text]mySentence=[mySentence][word] [/text] [math show=t]wordlength=[countchars][word][/countchars][/math] [showif [url][getchars start=[wordlength]&end=[wordlength]][word][/getchars][/url]=[url].[/url]] [text]ignorewords=yes[/text] [/showif] [showif [url][getchars start=[wordlength]&end=[wordlength]][word][/getchars][/url]=[url]![/url]] [text]ignorewords=yes[/text] [/showif] [showif [url][getchars start=[wordlength]&end=[wordlength]][word][/getchars][/url]=[url]?[/url]] [text]ignorewords=yes[/text] [/showif][/hideif][/listwords]
The first sentence is:
[mySentence]-- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Centurywebhosting ~ co-location ~ wireless access ~ WebCat programming-------------------------------------------------------------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:
At 1:34 PM -0600 11/24/04, Clint Davis wrote:>I need to extract the first sentence out of a block of text. The sentence>will end with a period, exclamation point, or question mark followed by a>space. May be a job for [grep]. Any ideas?Here ya go:[text]ignorewords=no[/text][text]mySentence=[/text][listwords words=This is a sentence with 2.2 children. And this is another one.&delimiters= ][hideif [ignorewords]=yes][!]debug: [index]-[word]-
[/!] [text]mySentence=[mySentence][word] [/text] [math show=t]wordlength=[countchars][word][/countchars][/math] [showif [url][getchars start=[wordlength]&end=[wordlength]][word][/getchars][/url]=[url].[/url]] [text]ignorewords=yes[/text] [/showif] [showif [url][getchars start=[wordlength]&end=[wordlength]][word][/getchars][/url]=[url]![/url]] [text]ignorewords=yes[/text] [/showif] [showif [url][getchars start=[wordlength]&end=[wordlength]][word][/getchars][/url]=[url]?[/url]] [text]ignorewords=yes[/text] [/showif][/hideif][/listwords]
The first sentence is:
[mySentence]-- _______________________________________________________________ Joseph D'Andrea ~ http://www.west21.com/ ~ JoeDan@West21.com WEST21.com Internet services for the 21st Centurywebhosting ~ co-location ~ wireless access ~ WebCat programming-------------------------------------------------------------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/
Joe D'Andrea
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:
WebCat2final1 crashes (1997)
PCS Emailer's role ? (1997)
allow or deny based on referer.... (1997)
Replace Statement (1997)
WC2b15 File Corruption (1997)
Another question about credit cards (1997)
where to put code (1998)
Almost a there but..bye bye NetCloak (1997)
Date Time Oddness (1999)
.html processing? (1998)
Test (2001)
WebDNA dying or ... ? (2005)
ShipCosts database (1997)
WEBDNA tags don't process in a .js file (2002)
tab as word delimiter (2000)
Store Builder Weirdness (1999)
WebMerchant (1997)
Hidden or Forbidden? (1998)
japanese characters (1997)
What is WebDNA (1997)