Created
July 19, 2020 04:08
-
-
Save katsumitakano/889c15811cfec89fff6c58c807d6c9f4 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/jipeweg
This file contains hidden or 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 name="description" content="hogefuga code"> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width"> | |
<title>JS Bin</title> | |
</head> | |
<body> | |
<script id="jsbin-javascript"> | |
"use strict"; | |
var str = "foo024"; | |
str.replace(/(\d*)$/, function (match, p1, offset) { | |
console.log(match, p1, offset); | |
}); | |
</script> | |
<script id="jsbin-source-javascript" type="text/javascript">const str = "foo024"; | |
str.replace(/(\d*)$/, (match, p1, offset) => { | |
console.log(match, p1, offset) | |
})</script></body> | |
</html> |
This file contains hidden or 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
"use strict"; | |
var str = "foo024"; | |
str.replace(/(\d*)$/, function (match, p1, offset) { | |
console.log(match, p1, offset); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment