W3CAPI 实例工具箱
运行代码
源代码
<!DOCTYPE html> <head> <meta charset="utf-8" /> <title>js 示例</title> </head> <body> <script type="text/javascript"> let TestStr = "Python 3.8.0, documentation released on 14 October 2019."; let my_Regexp = /[d-n0-9]/gi; let rexp = TestStr.match(my_Regexp); console.log(rexp); // ["h", "n", "3", "8", "0", "d", "m", "e", "n", "i", "n", "e", "l", "e", "e", "d", "n", "1", "4", "e", "2", "0", "1", "9"] </script> </body> </html>
运行结果
友情提示
您正在使用的浏览器为IE浏览器,或者使用了IE模式
如果你使用的是IE浏览器,建议您下载
360急速浏览器
/
火狐浏览器
/
Opera浏览器