Permalink
Browse files

Update README.md

  • Loading branch information...
1 parent d4b7816 commit 134481e5618efd03947397cb3754f9f7307536c2 @Daniel15 committed Oct 1, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 README.md
View
@@ -18,9 +18,8 @@ alert(results.name) // "Daniel"
alert(results.year) // "2012"
// Replacing
-var regexp = new NamedRegExp('^(?P<year>20[1-9][0-9]) is (?P<msg>.+)$');
-var result = '2012 is awesome'.replace(regexp, 'It\'s \\k<msg> in \\k<year>!');
-alert(result); // "It's awesome in 2012!"
+var result = 'Hello Daniel from 2012'.replace(regexp, '\\k<year> is year of the \\k<name>!');
+alert(result); // "2012 is year of the Daniel!"
```
Licence

0 comments on commit 134481e

Please sign in to comment.