Skip to content

Instantly share code, notes, and snippets.

@DmitrySoshnikov
Created April 24, 2017 23:12
Show Gist options
  • Save DmitrySoshnikov/d6b9af5a1496e74c70c0feda8d68d790 to your computer and use it in GitHub Desktop.
Save DmitrySoshnikov/d6b9af5a1496e74c70c0feda8d68d790 to your computer and use it in GitHub Desktop.
regexp-s-flag.js
// 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