I have this patterns:
^\s*(?=\d*(-\d*){0,2}$)(?=(\d-*){13}$).*$
allows strings like "114-4316191466" or "1144316191466" " 1144316191466". I'd like to allow whitespace also at the end. Best way to do that?
Thanks
I have this patterns:
^\s*(?=\d*(-\d*){0,2}$)(?=(\d-*){13}$).*$
allows strings like "114-4316191466" or "1144316191466" " 1144316191466". I'd like to allow whitespace also at the end. Best way to do that?
Thanks
a whitespace is \s so to allow one or more whitespaces add \s+ or \s* at the end (as you did for the beginning of the string)