Re: Count regular expressions in a file
This WebDNA talk-list message is from 2007
It keeps the original formatting.
numero = 69396
interpreted = N
texte = Ki Song wrote:> I want to count the number of times "
" (without quotes) is in a> file.> > I'm using this shell command into a tpl file, but it returns nothing:> > [shell]/bin/grep -c \ myfile[/shell]> > Will this not work?Something like this may work:[text]count=0[/text][listwords words=[url][yourblockoftext][/url]] [showif [word]=[url][/url]] [text]count=[math][count]+1[/math][/text] [/showif][/listwords] appeared [count] times!Donovannote:If you are doing this for xml debugging purposes, BBedit has anice count words (expression) feature.-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Desktop Publishing, Print Consulting, Labels -> <-Glass Products, off-hand Classes/studio rental-> PH:>(608) 770-3822 TALK:>http://artglass-forum.com WEB:> http://www.euca.us & http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------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:
Ki Song wrote:> I want to count the number of times "" (without quotes) is in a> file.> > I'm using this shell command into a tpl file, but it returns nothing:> > [shell]/bin/grep -c \ myfile[/shell]> > Will this not work?Something like this may work:[text]count=0[/text][listwords words=[url][yourblockoftext][/url]] [showif [word]=[url][/url]] [text]count=[math][count]+1[/math][/text] [/showif][/listwords] appeared [count] times!Donovannote:If you are doing this for xml debugging purposes, BBedit has anice count words (expression) feature.-- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Desktop Publishing, Print Consulting, Labels -> <-Glass Products, off-hand Classes/studio rental-> PH:>(608) 770-3822 TALK:>http://artglass-forum.com WEB:> http://www.euca.us & http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o-------------------------------------------------------------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/
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:
More than one db with the same namn (was: WC2f3) (1997)
carriage returns in data (1997)
BUG: Random sort is not random at all..... (2000)
Webcat no longer supported? (2006)
Help name our technology! (1997)
[cart]'s ever get recycled? (2000)
triggers.db (1999)
Warning: Mac OS X 10.2.4 Update Overwrites Apache'shttpd.conf (2003)
IE Cache Problems... (1999)
Webcat 4.0.x and apache 2.x (2002)
"Advanced" Search Algorithm (2008)
Help name our technology! I found it (1997)
Getting total number of items ordered (1997)
[append] (1997)
WebCat2b15MacPlugin - showing [math] (1997)
Setting up WebCatalog with Retail Pro data (1996)
service stop and restart (1997)
[WebDNA] WebDNA not parsing php files (2012)
empty shopping cart message (1997)
[WebDNA] looking for a team (2010)