regular expression for example.*
Hi,
I want a regular expression matching anything after "." For example i have three : spam.asdfasdf2234s spam.898HY^% spam.%^^HHG^%$FVV I want a regular expression which matches anything after spam. I have one, let me know if its correct Code:
/^spam.*/i |
Quote:
|
that would work, but it's not nearly as good as it can be.
firstly the . there is a special character, meaning "a character", not a literal period. so that will match anything. and the * means match that last thing zero or more times. so "spam" itself would match it, as would "spamx123" neither of which fit your examples. if you do "^spam\..+" that will match strings when there is *one* character or more after a real period mark. |
Code:
/spam\.\(.*\)/ have a look in spamassins man page |
All times are GMT -5. The time now is 02:02 AM. |