Skip to content

Instantly share code, notes, and snippets.

@katsumitakano
Created July 19, 2020 04:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save katsumitakano/889c15811cfec89fff6c58c807d6c9f4 to your computer and use it in GitHub Desktop.
Save katsumitakano/889c15811cfec89fff6c58c807d6c9f4 to your computer and use it in GitHub Desktop.
JS Bin // source https://jsbin.com/jipeweg
<!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>
"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