In general no, you should not use match from the string. If you are getting input from user, you want a more complex processing (like stripping all whitespace), and if you are getting input from API calls, you want to either use specified name as-is, or fail.
Yes, fullmatch() will help, and so will \Z. It's just that it is so easy to forget...
Yes, fullmatch() will help, and so will \Z. It's just that it is so easy to forget...