It's all about:
[A-Za-z]+@.(com|net|org|edu)
That is a simple regular expression for validating an email address. Regular Expressions are a pattern matching language for strings. They can be quite sophisticated and the seemingly esoteric syntax is daunting for people who are new to them.
Indeed, I first discovered regular expressions when I began (and still continue upon) my quest to become a real hacker and use PERL.
Along the way I've found some useful tools - by far the most useful is a book: Mastering Regular Expressions from the folks over at O'Reilly. The author, Jeffrey Friedl, is an amazing communicator, demystifying the syntax in a mere chapter and proceeding to give concise and practical examples of their use.
I wrote a tool in VB 6 that shows how to utilize the Regular Expressions engine Microsoft exposed with newer versions of the Windows Scripting Host. You can download either the source code or the executable.
If you are wary of the download or you don't have Visual Studio, you can use this simple web page I wrote using VBScript and some DHTML. Apologies to Netscape users...
I'm sure there are good online resources - I'll edit this post in the near future to add them. Until then, here are some useful things you can do with Regular Expressions and apply them right away:
,[^ ][A-Za-z] Find any instances of a comma without an immediately following space.
<.+=[^"] Find an html tag that doesn't have a beginning attribute quote.
A little idea seeking implementation: a library of regular expressions for cleaning up html and transitioning it to xhtml. Just a thought.
11:14:57 PM
|