My RegExp is
/^[A-Za-z ]*$/
Then what should i write to not allow space at start or end, but allow space in middle
This regular expression will match any strings that conform to your original expression that do not have a space at the beginning or end
^(?! )[A-Za-z ]*(?<! )$
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With