Regular Expression to search for double occurence of a pattern
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Regular Expression to search for double occurence of a pattern

From: <ink.paint@gmail.com>
Date: Fri Oct 28 2005 - 20:50:57 CEST

Hi

What would be the best method to search a string for double occurance
of a pattern.

Ex: set mystr "my name is your name only"

now i have the word "name" occuring twice in 'mystr'.
What is the method to count the occurance of word "name" ?
or if i want to make sure it occurs twice what is the method ?

Thanks
Arun
Received on Mon Nov 21 00:36:48 2005