Created
May 5, 2015 19:42
-
-
Save vanchelo/c1f9eae7c46171344d99 to your computer and use it in GitHub Desktop.
JS Bin // source http://jsbin.com/fixuja
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
var r = /(\{\{user.(.*?)\}\})/gi | |
var result, res = []; | |
var text = '{{user.name|Petr}} hello {{user.email}}'; | |
while (result = r.exec(text)) { | |
res.push(result[1]) | |
} | |
console.log(res) | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">var r = /(\{\{user.(.*?)\}\})/gi | |
var result, res = []; | |
var text = '{{user.name|Petr}} hello {{user.email}}'; | |
while (result = r.exec(text)) { | |
res.push(result[1]) | |
} | |
console.log(res)</script></body> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var r = /(\{\{user.(.*?)\}\})/gi | |
var result, res = []; | |
var text = '{{user.name|Petr}} hello {{user.email}}'; | |
while (result = r.exec(text)) { | |
res.push(result[1]) | |
} | |
console.log(res) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment