随笔分类 -  正则表达式

摘要:js替换字符串里的空格_百度搜索 (baidu.com) 阅读全文
posted @ 2024-08-02 18:34 铁打的代码流水的bug 阅读(3) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/qq_35350009/article/details/128547978 阅读全文
posted @ 2024-05-10 17:18 铁打的代码流水的bug 阅读(2) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/future_1_/article/details/130315248?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default- 阅读全文
posted @ 2024-05-10 17:17 铁打的代码流水的bug 阅读(5) 评论(0) 推荐(0) 编辑
摘要:/[\`\~\!\@\#\$\%\^\&\*\(\)\_\+\-\=\{\}\|\[\]\:\;\'\<\>\?\,\.]+/.test(string)//直接写判断条件时,不使用 /^ XXX $/.test(string) (^)匹配输入字符串的开始位置和($)匹配输入字符串的结束位置 直接使用 阅读全文
posted @ 2023-12-26 18:28 铁打的代码流水的bug 阅读(2169) 评论(0) 推荐(0) 编辑
摘要:https://cloud.tencent.com/developer/article/1961094 阅读全文
posted @ 2023-12-20 19:01 铁打的代码流水的bug 阅读(12) 评论(0) 推荐(0) 编辑
摘要:合法url export function validateURL(url) { const urlregex = /^(https?|ftp):\/\/([a-zA-Z0-9.-]+(:[a-zA-Z0-9.&%$-]+)*@)*((25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1 阅读全文
posted @ 2022-04-24 10:30 铁打的代码流水的bug 阅读(327) 评论(0) 推荐(0) 编辑
摘要:js全局替换空格,制表符,换行符 "/ "这个是固定写法, "\s"匹配任何不可见字符,包括空格、制表符、换页符等等。等价于[ \f\n\r\t\v], "g"表示全局匹配将替换所有匹配的子串,如果不加"g"当匹配到第一个后就结束了 正则表达式中/i,/g,/ig,/gi,/m的区别和含义 /i ( 阅读全文
posted @ 2021-05-18 15:48 铁打的代码流水的bug 阅读(1515) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示