$inrect() would've been even simpler :P but i agree, people shouldn't just jump to regex to solve their problems but should consider the suitability of other methods first. it'll improve your scripting logic!