J
jayanthigk2004
Input
a-
Patterns
\w*-*
\w*(-*)
\w*(-)*
\w*[-]*
No of the patterns results in a match. Tried escaps(\) before hyphen
still no match.
My requirement is to make sure a string contains only digits, alphabets
and hypen (each 0 or more times).
a-
Patterns
\w*-*
\w*(-*)
\w*(-)*
\w*[-]*
No of the patterns results in a match. Tried escaps(\) before hyphen
still no match.
My requirement is to make sure a string contains only digits, alphabets
and hypen (each 0 or more times).