Skip to content

Instantly share code, notes, and snippets.

@kiinlam
Created December 18, 2014 04:01
Show Gist options
  • Save kiinlam/2e7fb34ea1cead72247f to your computer and use it in GitHub Desktop.
Save kiinlam/2e7fb34ea1cead72247f to your computer and use it in GitHub Desktop.
js中string对象的replace方法的用法
String.replace(reg, function (matchStr, subStr1,..., subStrN, indexOfMatchStr, originStr) {
return anything;
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment