Created
December 11, 2020 08:57
-
-
Save conanak99/c66452527efe4a67959f93406d12e8fb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Code bỏ kí tự đặc biệt và viết hoa | |
let input = 'abd4%$#@#'; | |
input = input.trim().replace(/[^a-zA-Z ]/g, "").toUpperCase() | |
// Đoạn code khác ... | |
// Copy lần 1 | |
const username = 'ahihi-de-em-di' | |
const trimmedUsername = username.trim().replace(/[^a-zA-Z ]/g, "").toUpperCase() | |
// ...Copy tiếp logic qua đoạn khác | |
const id = 'jro@091ksa' | |
return id.trim().replace(/[^a-zA-Z ]/g, "").toUpperCase() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment