Newb Newb wrote: > Is there any regualar expressions,which Should not allow blank space as > the first character for my Department Name field. > any helps on this... > Thanks
If you're specifically looking for a regepxp that will match any thing that doesn't start with a space then try: /^[^\s]/ If it returns nil, there's a space, if not then there's no space. Otherwise I'd go with Colin's approach. Gavin http://handyrailstips.com -- Posted via http://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 -~----------~----~----~----~------~----~------~--~---

