Hi -- On Thu, 21 Dec 2006, Joe Peck wrote: > Daniel Finnie wrote: >> Why are you doing /[\s\d\w]+?/? Just use /.+?/. >> >> Dan > > Good point. I was using .+? earlier, but thought that might be part of > my problem. It seems to accept @x even if it contains more than 3 > [joe][/joe] pairs. That's because {1,3} doesn't mean there can't be another. Usually you'd anchor it or surround it with something else, like: /Xa{1,3}X/ so it can't keep repeating. David -- Q. What's a good holiday present for the serious Rails developer? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) aka The Ruby book for Rails developers! Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)