procmail
[Top] [All Lists]

Re: need help with a regular expression

2001-02-22 14:43:33
Douglas Otto asked,

| I am having trouble coming up with an expression that will match any
| repeated special character.  For example, at least 4 or more contiguous
| occurrences of a character as in !!!! or #### or ^^^^, you get the idea,
| without having to match them individually.  Any ideas?

Four or more consecutive exclamation points:  !!!!+
 [if they're at the beginning of the regexp, precede the first one with ()]

Four or more octothorpes:  ####+

Four or more carets: \^\^\^\^+  [same warning as for the exclamation points]

If you were hoping for something like \^{4,}, procmail does not implement
that.  It might some day (with backslashes left of the braces).
_______________________________________________
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>