Created
September 26, 2019 16:04
-
-
Save TrySpace/c1078a7a2e82ee1bcf634cb80ddae76d to your computer and use it in GitHub Desktop.
regex test
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
function test () { | |
const split = ["man", "man"]; | |
const pathRegex = new RegExp(/^[A-ZÀ-Ýa-zà-ý0-9_]+[^.#$?\[\]]$/g); | |
console.log(split) | |
split.forEach((word: string, key) => { | |
console.log(key) | |
if (pathRegex.test(word)) { | |
console.info('Word:', word) | |
tags.push(word) | |
} else { | |
console.log('Not word:', word) | |
} | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment