Skip to content

Regular expression for matching quotation marks

License

Notifications You must be signed in to change notification settings

shelfio/quotation-marks-regex

Repository files navigation

quotation-marks-regex CircleCI 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