I was thinking of doing it this way but it seems somewhat unruby. From these responces though it looks like i'll have to tack some tiny method on to regexp to achieve this, i was hoping that this functionality was a part of regexp (or somewhere else in ruby) and that i had just missed it. - Geoff