You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What did you do?
Tried to construct a regex pattern that matches whitespaces between words, so as to validate names. The pattern should match only letters and whitespaces but seems to return true for other characters as well.
Always assume that the error is in your code before thinking there is a bug in the standard library. You should also try the forums to ask questions first: https://golang.org/wiki/Questions.
mikioh
changed the title
Regex returns true for strings that it should not match
regexp: Regex returns true for strings that it should not match
Feb 21, 2018
Please answer these questions before submitting your issue. Thanks!
What did you do?
Tried to construct a regex pattern that matches whitespaces between words, so as to validate names. The pattern should match only letters and whitespaces but seems to return true for other characters as well.
https://play.golang.org/p/3LoX8_haM_6
What did you expect to see?
The program to return false
What did you see instead?
The program returned true
Does this issue reproduce with the latest release (go1.9.4)?
System details
The text was updated successfully, but these errors were encountered: