David Seruyange's Radio Weblog
Tidbits for developers and the interested...

David-ism
Watu
Vicariously
Photo Blogs
Form, Function
Write, Think
Web People
Coders
Feel Good


Subscribe to "David Seruyange's Radio Weblog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

Home (all entries)  | Technie  | Prattle (personal stuff)  | Books  | Snippets  | WhiteBox


Monday, July 22, 2002
 

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    comment []


Click here to visit the Radio UserLand website. © Copyright 2006 David Seruyange.
Last update: 5/23/2006; 8:19:37 PM.
July 2002
Sun Mon Tue Wed Thu Fri Sat
  1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30 31      
Jun   Aug