Socket
Socket
Sign inDemoInstall

xregexp

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

xregexp - npm Package Compare versions

Comparing version 1.5.2 to 1.5.3

2

package.json
{
"name" : "xregexp",
"version" : "1.5.2",
"version" : "1.5.3",
"description" : "The one of a kind JavaScript regular expression library.",

@@ -5,0 +5,0 @@ "author": "Steven Levithan <steves_list@hotmail.com>",

@@ -22,32 +22,37 @@

var XRegExp = require('xregexp').XRegExp;
console.log('Héllö Wôrld'.match(XRegExp('\\p{L}+')));
var date = XRegExp('(?<year> [0-9]{4}) -? # year \n\
(?<month> [0-9]{2}) -? # month \n\
(?<day> [0-9]{2}) # day ', 'x');
var match = date.exec('2011-06-30');
if (match) {
console.log(match.day);
}
```javascript
var XRegExp = require('xregexp').XRegExp;
console.log('Héllö Wôrld'.match(XRegExp('\\p{L}+')));
var date = XRegExp('(?<year> [0-9]{4}) -? # year \n\
(?<month> [0-9]{2}) -? # month \n\
(?<day> [0-9]{2}) # day ', 'x');
var match = date.exec('2011-06-30');
if (match) {
console.log(match.day);
}
```
For CoffeeScripters:
{XRegExp} = require 'xregexp'
console.log 'Héllö Wôrld'.match XRegExp '\\p{L}+'
date = XRegExp '''
(?<year> [0-9]{4}) -? # year
(?<month> [0-9]{2}) -? # month
(?<day> [0-9]{2}) # day
''', 'x'
match = date.exec '2011-06-30'
console.log match.day if match
```coffeescript
{XRegExp} = require 'xregexp'
console.log 'Héllö Wôrld'.match XRegExp '\\p{L}+'
date = XRegExp '''
(?<year> [0-9]{4}) -? # year
(?<month> [0-9]{2}) -? # month
(?<day> [0-9]{2}) # day
''', 'x'
match = date.exec '2011-06-30'
console.log match.day if match
```
Changelog
---------
* 1.5.3: Fixed problems with NPM package.
* 1.5.2: Updated to support require("xregexp").XRegExp, which is the future method.

@@ -54,0 +59,0 @@ * 1.5.1: Several bugs fixed and updated to use Unicode 6.1 character database (instead of 5.2).

Sorry, the diff of this file is not supported yet

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