c# - Regex Match string from starts with -
this regular expression.
^ak[0-9a-za-z-/#\s]{1,15}$
it matches whole string when enter text starts like'aktest123'
but want match below strings like
a ak aktest
how can modify regex match string first character?
this should magic:
^(a|ak[0-9a-za-z-/#\s]{0,15})$
that means accept a, or ak (notice changed 1 @ end 0), or ak , following 15 characters list. want, right?
Comments
Post a Comment