使用 JavaScript 正则表达式查找非空白字符。\
htmljavascriptprogramming scripts更新于 2024/6/3 17:48:17
要查找非空白字符,请使用以下 −
\S
示例
您可以尝试运行以下代码来查找非空白字符 −
<html> <head> <title>JavaScript Regular Expression</title> </head> <body> <script> var myStr = "100% Responsive!"; var reg = /\S/g; var match = myStr.match(reg); document.write(match); </script> </body> </html>
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

