Regular expression to match a name

Posted by zoom_pat277 on Stack Overflow See other posts from Stack Overflow or by zoom_pat277
Published on 2010-04-27T13:54:21Z Indexed on 2010/04/27 14:03 UTC
Read the original article Hit count: 239

Filed under:
|
|

What will be the regular expression in javascript to match a name field, which allows only letters, apostrophes and hyphons?

so that jhon's avat-ar or Josh is valid?

Thanks

© Stack Overflow or respective owner

Related posts about regex

Related posts about JavaScript