Permalink
Switch branches/tags
Nothing to show
Find file Copy path
f1b4f9a Feb 1, 2012
1 contributor

Users who have contributed to this file

25 lines (20 sloc) 445 Bytes
<!doctype html>
<html lang="en">
<head>
<title>JavaScript Patterns</title>
<meta charset="utf-8">
</head>
<body>
<script>
/* Title: Regular Expression Literal
* Description: the regular expression literal notation is shorter
*/
// antipattern
var re = new RegExp("\\\\", "gm");
// preferred
var re = /\\/gm;
// References
// http://shop.oreilly.com/product/9780596806767.do
</script>
</body>
</html>