Use secure regexes as recommended here: http://guides.rubyonrails.org/security.html#regular-expressions