I've started to study on javascript and regexp specially. I am trying to improve myself on generating regular expressions.
What I am trying to do is - I have a name field in my html file (its in a form ofc)
...
<label for=txtName>Your Name*: </label>
<input id=txtName type=text name=txtName size=30 maxlength=40>
...
And in my js file I am trying to check name cannot start with any NON-letter character, only for the first character.
And whole field cannoth contain any special character other than dash and space.
They cannot start with any non-letter character ;
/^[A-Z a-z][A-Z a-z 0-9]*$/
They cannot contain any symbol other than dash and space ;
/^*[[&-._].*]{1,}$/
When I am testing if it works, it doesn't work at all. In which part am I failing ?