Created
February 13, 2017 06:24
-
-
Save casprwang/18628d4b06448b9f6a1fa34ef5bf4dfe to your computer and use it in GitHub Desktop.
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
let str = 'sajldfj jksdfajl akljf kdaj kjfsak jk' | |
let regex = /\w+/g | |
console.log(str.match(regex)) | |
console.log(str.match(NaN)) | |
console.log(str.match(/jjslkdjfalkj/)) | |
console.log(str.match(Infinity)) | |
// [ 'sajldfj', 'jksdfajl', 'akljf', 'kdaj', 'kjfsak', 'jk' ] | |
// null | |
// null | |
// null |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment