-----018-RegExp.html-----
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>RegExp</title> 5 <meta http-equiv="ContentType" content="text/html; charset=utf-8"> 6 </head> 7 <body> 8 <script type="text/javascript"> 9 RegExp("(\\w+).+?(\\w+).+?(\\w+).+?(\\w+)").exec("http://www.google.com"); 10 document.writeln("<pre>" + "RegExp.$0: " + RegExp.$0); 11 document.writeln("RegExp.$1: " + RegExp.$1); 12 document.writeln("RegExp.$2: " + RegExp.$2); 13 document.writeln("RegExp.$3: " + RegExp.$3); 14 document.writeln("RegExp.$4: " + RegExp.$4); 15 document.writeln("RegExp.$5: " + RegExp.$5 + "</pre>"); 16 </script> 17 </body> 18 </html>