Regular Expression

It’s been a while since I last wrote anything on here — this blog has been abandoned since I went back to uni. — so I thought it best to show you a small part of the work I’ve been doing.

So here it is, the regular expression I have written for tradeswomen.biz:
search.match(/^(?:an?\s)?([A-Za-z\s]+)?\s(?:(?:in|from|near|around|
close to|working in|based in)\s)([A-Za-z0-9\s]+)(?:[.,;]?)$/);

This entry was posted in javascript, php, prototype. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>