Socket
Socket
Sign inDemoInstall

quoted-string-regex

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quoted-string-regex

JavaScript regular expression for matching a quoted string.


Version published
Maintainers
1
Created
Source

quoted-string-regex NPM version Build Status

JavaScript regular expression for matching a quoted string.

Originally posted here.

Install

Install with npm

$ npm i quoted-string-regex --save

Usage

var regex = require('quoted-string-regex');
('var foo = \'bar\';').match(regex());
//=> ['bar']

('var foo = "bar";').match(regex());
//=> ['"bar"'']

('var foo = "bar";\nvar bar = \'baz\'').match(regex());
//=> ['"bar"', '\'baz\'']

('foo bar ". // \' \\ . // \' \\ ." baz').match(regex());
//=> ['". // \' \\ . // \' \\ ."']

Running tests

Install dev dependencies:

$ npm i -d && npm test

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Author

Jon Schlinkert

License

Copyright © 2015 Jon Schlinkert Released under the MIT license.


This file was generated by verb-cli on November 02, 2015.

Keywords

FAQs

Package last updated on 02 Nov 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc