The string I’m testing can be matched with [\w-]+. Can I test if a string conforms to this in Python, instead of having a list of the disallowed characters and testing for that?
The string I’m testing can be matched with [\w-]+ . Can I test if
Share
If you want to test a string against a regular expression, use the re library