I need a regular expression for my Ruby on Rails application for the password field.
Any character or number or symbols is allowed except space.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If this is client-side validation in Javascript (or any language other than Ruby), this expression will match a string with no whitespace (
\S) at least one character (+), no max:^\S+$Ruby is the only language that uses multi-line mode by default, so the start-of-line
^and end-of-line$behave differently (they match once per input, no matter how many lines). So, if you are validating the input in Ruby, you’d need to use\Afor start-of-line and\Zfor end-of-line.\A\S+\Z