Created
April 24, 2017 23:12
-
-
Save DmitrySoshnikov/d6b9af5a1496e74c70c0feda8d68d790 to your computer and use it in GitHub Desktop.
regexp-s-flag.js
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
// Using `s` flag to match all chars | |
// including \n: | |
const allCharsRe = /.+/s; | |
console.log(allCharsRe.test('\n')); // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment