@shelf/quotation-marks-regex

Regular expression for matching quotation marks

Usage no npm install needed!

<script type="module">
  import shelfQuotationMarksRegex from 'https://cdn.skypack.dev/@shelf/quotation-marks-regex';
</script>

README

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

License

MIT © Shelf