4.元字符-量词.html 368 B

12345678910111213141516
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Document</title>
  7. </head>
  8. <body>
  9. <script>
  10. const reg = /a{1,}$/;
  11. console.log(reg.test("aa"));
  12. console.log(reg.test(" "));
  13. console.log(reg.test("aab"));
  14. </script>
  15. </body>
  16. </html>