From: stephen O'D Date: 2008-12-18T07:37:13+09:00 Subject: Re: Hopefully simple regex > > Try this: > > @regex = /(?:^|\s)(@\w+)/ > > David > > -- > David A. Black / Ruby Power and Light, LLC > Ruby/Rails consulting & training:http://www.rubypal.com > Coming in 2009: The Well-Grounded Rubyist (http://manning.com/black2) Perfect - I didn't know you could (or even think to try) putting the 'start of string' anchor inside a group with an alternative! At least I have learned something from the last hour of trying!