We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
From https://github.com/callumacrae/tryregex/blob/master/app/assets/js/globalFuncs.js#L72
data.firstEscaped = firstName.replace(/([$()*+.?\[^|\]])/g, '\\$1');
It is missing escape for {, }, \ and / (the last one for RegExp literal only). The code could be changed to:
{
}
\
/
data.firstEscaped = firstName.replace(/([$()*+.?\[^|\]{}\/\\])/g, '\\$1');
Or without using capturing group:
data.firstEscaped = firstName.replace(/[$()*+.?\[^|\]{}\/\\]/g, '\\$&');
The text was updated successfully, but these errors were encountered:
Sure. Does this fix any bugs? Are there any cases where the name is escaped improperly?
Sorry, something went wrong.
Sure, it's very unlikely anyone has this name, but since you escaped all other characters, why not go for a full coverage?
setName("lol!@#$%^&*()_+-={}[]|\\:\";'<>?,./")
fair enough! would you be able to send a PR? Otherwise, I'll do it later.
Thanks!
No branches or pull requests
From https://github.com/callumacrae/tryregex/blob/master/app/assets/js/globalFuncs.js#L72
It is missing escape for
{
,}
,\
and/
(the last one for RegExp literal only). The code could be changed to:Or without using capturing group:
The text was updated successfully, but these errors were encountered: