Not quite, in PostgreSql you could use SELECT * FROM tablename WHERE fieldname SIMILAR TO '[-a-z]*0[-a-z]*1[- a-z]*2[-a-z]*3[-a-z]*4[-a-z]*5[-a-z]*6[-a-z]*7[-a-z]*8[-a-z]*'
to push all the filtering into the query. On Aug 28, 11:57 am, Aldric Giacomoni <rails-mailing-l...@andreas- s.net> wrote: > Rick Lloyd wrote: > > SQL provides a LIKE function for simple pattern matching. Also, both > > mySql and PostgreSql provide REGEX functions though they may not be > > identical in use. > > So are you suggesting that I do something like this: > > string = params[:social] > # magic on string until string = "%0%1%2%3%4%5%6%7%8%" ? > -- > Posted viahttp://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

