procmail
[Top] [All Lists]

Re: regex syntax of [tabspace]*

2002-06-20 08:37:20
On 20 Jun, Timothy J. Luoma wrote:
| 
| [...]
| 
| where the empty [ ] is a tab followed by a space.
| 
| Am I correct in my assumption that
| 
|       [        ]*SV:
| 
| means "Any number of tabs OR a spaces before a literal 'SV:' " ?
| 

To be really specific: any number of tabs AND/OR spaces (i.e. any
number of tab, space, or both, in any quantity and any order). And as
Udi pointed out, and I'm sure you know, "any number" includes zero.

$ perl -e 'print "\nregexp is \"",q/2[3a]*b/,"\":\n\n";for(qw(123abc \
12a3a3abc 1233333bc 12bc)){print"$_ matches\n"if/2[3a]*b/;}'

regexp is "2[3a]*b":

123abc matches
12a3a3abc matches
1233333bc matches
12bc matches

-- 
Reply to list please, or append "6" to "procmail" in address if you must.
Spammers' unrelenting address harvesting forces me to this...reluctantly.


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>