regex - Add spacebar in regular expression -
this question has answer here:
- matching space in regex 7 answers
i use regular expression checking
public const string fullnameregularexpression = @"^[a-za-z0-9._-]+$";
how add "spacebar" in?
if looking 1 single space is: (
" "
), complete example can found in reference.
or if want match whitespace character (\n
,\r
,\f
,\t
, ), can use
\s
.
Comments
Post a Comment