Created
April 24, 2018 13:07
-
-
Save ties/9568a6d32d6267823c3ca26f4a7790e8 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
| /** | |
| * Regular expressions in javascript... | |
| * | |
| * Given that | |
| */ | |
| 'abc'.match(new RegExp('ab.')); | |
| // returns what is logged by | |
| console.log([ 'abc', index: 0, input: 'abc' ]) | |
| // and | |
| 'abc'.match(new RegExp('mis')) | |
| // => | |
| console.log(null) | |
| // What is the result of: | |
| 'abc'.match(new RegExp('ab\.')) | |
| // and: | |
| 'abc'.match(new RegExp(/ab\./)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment