Question

I want to write a regular expression to check string that contains only letters,digits,spaces,# and the string length should be minimum 10 and maximum 29 and string should not begin with blank.

please help me

Was it helpful?

Solution

This is one possible regular expression, but I don't know flex:

/^[a-zA-Z0-9#][a-zA-Z0-9 #]{9,28}$/
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top