Regex for single character and empty String(Not white space) -
i have optional fields in have accept single character , should accept empty string. ex: if have middle name field, in accepts single char. in future if don't want middle name on account should persist empty middle name in database.
i used below regexp. not working accept empty string [^$]|[a-za-z]+
could 1 me on this?
how ^[a-za-z]?$ (one or 0 letters)?
Comments
Post a Comment