Skip to content

Commit fa4765d

Browse files
committed
Update copyright and example year to 2014, and replace copyright symbol with (c). Closes slevithan#58.
1 parent fbe7005 commit fa4765d

File tree

11 files changed

+30
-30
lines changed

11 files changed

+30
-30
lines changed

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ var date = XRegExp('(?<year> [0-9]{4} ) -? # year \n\
2020
(?<day> [0-9]{2} ) # day ', 'x');
2121

2222
// XRegExp.exec gives you named backreferences on the match result
23-
var match = XRegExp.exec('2012-02-22', date);
24-
match.year; // -> '2012'
23+
var match = XRegExp.exec('2014-02-22', date);
24+
match.year; // -> '2014'
2525

2626
// It also includes optional pos and sticky arguments
2727
var pos = 3, result = [];
@@ -31,25 +31,25 @@ while (match = XRegExp.exec('<1><2><3><4>5<6>', /<(\d+)>/, pos, 'sticky')) {
3131
} // result -> ['2', '3', '4']
3232

3333
// XRegExp.replace allows named backreferences in replacements
34-
XRegExp.replace('2012-02-22', date, '${month}/${day}/${year}'); // -> '02/22/2012'
35-
XRegExp.replace('2012-02-22', date, function(match) {
34+
XRegExp.replace('2014-02-22', date, '${month}/${day}/${year}'); // -> '02/22/2014'
35+
XRegExp.replace('2014-02-22', date, function(match) {
3636
return match.month + '/' + match.day + '/' + match.year;
37-
}); // -> '02/22/2012'
37+
}); // -> '02/22/2014'
3838

3939
// In fact, XRegExps compile to RegExps and work perfectly with native methods
40-
date.test('2012-02-22'); // -> true
40+
date.test('2014-02-22'); // -> true
4141

4242
// The *only* caveat is that named captures must be referenced using numbered backreferences
43-
'2012-02-22'.replace(date, '$2/$3/$1'); // -> '02/22/2012'
43+
'2014-02-22'.replace(date, '$2/$3/$1'); // -> '02/22/2014'
4444

4545
// If you want, you can extend native methods so you don't have to worry about this.
4646
// Doing so also fixes numerous browser bugs in the native methods
4747
XRegExp.install('natives');
48-
'2012-02-22'.replace(date, '${month}/${day}/${year}'); // -> '02/22/2012'
49-
'2012-02-22'.replace(date, function(match) {
48+
'2014-02-22'.replace(date, '${month}/${day}/${year}'); // -> '02/22/2014'
49+
'2014-02-22'.replace(date, function(match) {
5050
return match.month + '/' + match.day + '/' + match.year;
51-
}); // -> '02/22/2012'
52-
date.exec('2012-02-22').year; // -> '2012'
51+
}); // -> '02/22/2014'
52+
date.exec('2014-02-22').year; // -> '2014'
5353

5454
// Extract every other digit from a string using XRegExp.forEach
5555
XRegExp.forEach('1a2345', /\d/, function(match, i) {
@@ -241,7 +241,7 @@ require({paths: {xregexp: 'xregexp-all'}}, ['xregexp'], function(XRegExp) {
241241

242242
## About
243243

244-
XRegExp copyright 2007-present by [Steven Levithan](http://stevenlevithan.com/).
244+
XRegExp copyright 2007-2014 by [Steven Levithan](http://stevenlevithan.com/).
245245

246246
Tools: Unicode range generators by [Mathias Bynens](http://mathiasbynens.be/), and adapted from his [unicode-data](https://github.com/mathiasbynens/unicode-data) project. Source file concatenator by [Bjarke Walling](http://twitter.com/walling).
247247

src/addons/build.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* XRegExp.build 3.0.0-pre
33
* <http://xregexp.com/>
4-
* Steven Levithan © 2012 MIT License
4+
* Steven Levithan (c) 2012-2014 MIT License
55
* Inspired by Lea Verou's RegExp.create <http://lea.verou.me/>
66
*/
77

src/addons/matchrecursive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* XRegExp.matchRecursive 3.0.0-pre
33
* <http://xregexp.com/>
4-
* Steven Levithan © 2009-2012 MIT License
4+
* Steven Levithan (c) 2009-2014 MIT License
55
*/
66

77
(function(XRegExp) {

src/addons/unicode/unicode-base.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* XRegExp Unicode Base 3.0.0-pre
33
* <http://xregexp.com/>
4-
* Steven Levithan © 2008-2012 MIT License
4+
* Steven Levithan (c) 2008-2014 MIT License
55
*/
66

77
/**

src/addons/unicode/unicode-blocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* XRegExp Unicode Blocks 3.0.0-pre
33
* <http://xregexp.com/>
4-
* Steven Levithan © 2010-2012 MIT License
4+
* Steven Levithan (c) 2010-2014 MIT License
55
* Uses Unicode 7.0.0 <http://unicode.org/>
66
* Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
77
*/

src/addons/unicode/unicode-categories.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/addons/unicode/unicode-properties.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/addons/unicode/unicode-scripts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* XRegExp Unicode Scripts 3.0.0-pre
33
* <http://xregexp.com/>
4-
* Steven Levithan © 2010-2012 MIT License
4+
* Steven Levithan (c) 2010-2014 MIT License
55
* Uses Unicode 7.0.0 <http://unicode.org/>
66
* Unicode data generated by Mathias Bynens <http://mathiasbynens.be/>
77
*/

src/xregexp.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* XRegExp 3.0.0-pre
33
* <http://xregexp.com/>
4-
* Steven Levithan © 2007-2012 MIT License
4+
* Steven Levithan (c) 2007-2014 MIT License
55
*/
66

77
/**

tools/intro.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/*!
22
* XRegExp-All 3.0.0-pre
33
* <http://xregexp.com/>
4-
* Steven Levithan © 2012 MIT License
4+
* Steven Levithan (c) 2012-2014 MIT License
55
*/
66

77
// Module systems magic dance

0 commit comments

Comments
 (0)