Regular Expression
Thursday, February 22nd, 2007It’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]+)(?:[.,;]?)$/);