Last active
July 30, 2020 05:11
-
-
Save tofusoup429/e1f3c139dc55e556c7b6501246943574 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
//testing if exampleString includes the regex pattern. | |
const regexPattern=/\s+[0-9]+-[0-9]+-[0-9]+\s+/; | |
const exampleString = | |
"Hi~ call me this number 093-5353-6234 after" + | |
" 4:30 pm or email me at tofusoup429@gmail.com anytime."; | |
const result1 = regexPattern.test(exampleString); | |
console.log("output: ",result1); | |
//output: true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment