notebook

from edd couchman, the creator of redheat and chopter

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]+)(?:[.,;]?)$/);


Categorized as javascript, php, prototype

Leave a Reply