[KLUG Members] Standard Regular Expressions (REs)
Adam Williams
members@kalamazoolinux.org
24 Mar 2003 12:55:09 -0500
>>Your e-mail regex is too restrictive (at least as I'm interpreting it).
>>E-mail addresses may contain a plus sign to the right of the address.
>>adam+presentations.ldavp3@morrison-ind.com as an example.
>You might notice that I said my RE for e-mail could be better.
>Do you have a better suggestion?
>>>But notice, one of these messy characters, [~!@#$%^&*()_+=],
>>Are underscores permitted the the left of the "@"? Recent testing has
>>reveals that most MTAs on the internet seem the barf on them.
>Again, we are looking for a list of "standard regular expressions".
>We really do not want to go through all of the RFCs to figure this out.
>What is open-source about anyway?
>Somewhere out in the OSS community, this exists ... we hope.
I'm not aware of one, but RFC822 should contain 99% of what you want. I
know several people have written wild procmail scripts for mail
filtering, they might be able to help (assuming they are reading).
>>>What are the "less frightening" differences between REs in Java and Perl?
>>regex should be the same everywhere.
>Are you more naive than I am? How is that possible?
Because most just link in the standard regex functionality from the C
libraries. I know perl and PHP do it that way. I've used regex a *LOT*
and never found a non-standard permutation. regex is also a POSIX
(1003.2) standard.