Created
June 12, 2017 17:03
-
-
Save jwadhwani/d167fe7c926bf2808b5661b5169c0b54 to your computer and use it in GitHub Desktop.
REGEXP(JS): Replace everything in a string except for upper case letters and commas
This file contains hidden or 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
const c = "A?A,V V,F2F, MM".replace( /[^A-Z,]/g, ''); | |
console.log(c); //AA,VV,FF,MM | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment