|
|
@@ -0,0 +1,35 @@
|
|
|
+<!DOCTYPE html>
|
|
|
+<html lang="en">
|
|
|
+<head>
|
|
|
+ <meta charset="UTF-8">
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
+ <title>Document</title>
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+ <script>
|
|
|
+ // const reg = /[abc]/;
|
|
|
+ // console.log(reg.test("ababab"));
|
|
|
+ // console.log(reg.test("abc"));
|
|
|
+ // console.log(reg.test("acbac"));
|
|
|
+ // console.log(reg.test("dh"));
|
|
|
+ // console.log(reg.test("abbhj"));
|
|
|
+
|
|
|
+ // const reg1 = /[0-9]/;
|
|
|
+ // const reg2 = /[a-z]/;
|
|
|
+ // const reg3 = /[A-Z]/;
|
|
|
+ const reg4 = /\w/;
|
|
|
+ // console.log(reg1.test(7));
|
|
|
+
|
|
|
+ // const reg5 = /^[^a-z]/;
|
|
|
+ // console.log(reg5.test(990));
|
|
|
+
|
|
|
+ const reg5 = /./;
|
|
|
+ console.log(reg5.test('\n'));
|
|
|
+ console.log(reg5.test('\r'));
|
|
|
+ console.log(reg5.test('\t'));
|
|
|
+ console.log(reg5.test(' '));
|
|
|
+ console.log(reg5.test('1212'));
|
|
|
+
|
|
|
+ </script>
|
|
|
+</body>
|
|
|
+</html>
|