I need to limit a text input to letters, numbers and a few characters including ' and ". The code I have without the ' looks like this: pattern='[a-zA-Z0-9\s+"*]{3,}'
This works fine, but when I try to add the ' inside the brackets, escaped or not, it fails. I have looked at all of the answers about patterns and regex here and elsewhere and can't seem to nail it. Thanks for the help.
htmlentitiescan be helpfullhtmlentitieswas the answer. I would never have thought to use that solution.pattern='[a-zA-Z0-9\s+\\x22*]{3,}'orpattern='[a-zA-Z0-9\s+\x22*]{3,}'should work, too.