0.1.1 • Published 2 years ago

@shelf/quotation-marks-regex v0.1.1

Weekly downloads
94
License
MIT
Repository
github
Last release
2 years ago

quotation-marks-regex CircleCI npm.io npm (scoped)

Regular expression for matching quotation marks (source)

Install

$ yarn add @shelf/quotation-marks-regex

Usage

const regex = require('@shelf/quotation-marks-regex');

const input = `"hello" 'hello' ,hello‘ «hello» ”hello” “hello“ ’hello’ ‚hello‛ „hello„ ‹hello›`;

// strip all quotation marks
const output = input.replace(new RegExp(regex, 'g'), '');
// => hello hello hello hello hello hello hello hello hello hello hello

Publish

$ git checkout master
$ yarn version
$ yarn publish
$ git push origin master --tags

License

MIT © Shelf