常用正则表达式大全!(例如匹配中文、匹配html)(The commonly used regular expressions Daquan! (for example Chinese matching, matching HTML)).doc
- 1、本文档共11页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
常用正则表达式大全!(例如匹配中文、匹配html)(The commonly used regular expressions Daquan! (for example Chinese matching, matching HTML))
常用正则表达式大全!(例如匹配中文、匹配html)(The commonly used regular expressions Daquan! (for example Chinese matching, matching HTML))
The commonly used regular expressions! (e.g., Chinese,, HTML)
Regular expression matching Chinese characters: [u4e00-u9fa5]
Commentary: Chinese, really is a headache, with this expression is easy.
Matching double byte characters (including Chinese characters,:[^x00-xff])
Commentary: can be used to calculate the length of the string (a double byte character length of 2 characters, ASCII 1)
Regular expression matching blank line: ns*r
Commentary: can be used to remove blank lines
Regular expression matching HTML markers: (S*?) [^]*.*? |.* ?
Commentary: the spread of the Internet version is too bad, this is only for the matching part, a nested tag complex is still incapable of action
Regular expression matching both blank characters: ^s*|s*$
Commentary: can be used to remove the trailing blank characters (including spaces, tabs, formfeed etc.), expression is very useful
Regular expression matching Email address: w+ ([-+.]w+) *@w+ ([-.]w+) *.w+ ([-.]w+) *
Commentary: form validation is very practical
Regular expression matching. URL: [a-zA-z]+: //[^s]*
Commentary: the online version of the spread function is very limited, the above basic can meet the needs of
Matching account is legitimate (letter, allow 5-16 bytes, allow alphanumeric underline):^[a-zA-Z][a-zA-Z0-9_]{4,15}$
Commentary: form validation is very practical
Matching domestic telephone number: d{3}-d{8}|d{4}-d{7}
Commentary: the form, such as 0511-4405222 or 021Tencent QQ number: [1-9][0-9]{4,},
Commentary: Tencent QQ numbers start from 10000
China, post encoding: [1-9]d{5} (D?!)
Commentary: Chinese post encoding 6 digits
Match ID: d{15}|d{18}
Commentary: China ID is 15 or 18
Address: d+.d+.d+.d+, IP
Commentary: useful extraction IP address
Matching specific number:
^[1-9]d*$/ /, positive integer
^-[1-9]d*$/ /, negative integer
Well, the integer [1-9]d*$/ /?
^[1-9]d*|0$/ /, non neg
您可能关注的文档
- 大班看图编故事活动《取皮球》(Large picture story take the ball activities).doc
- 大班语言续编故事活动《老虎来了》(Class language activities continuation of the story of a tiger).doc
- 大胆的战略构想,另类的品牌之路(Strategic conception of bold, offbeat brand road).doc
- 大班美术教案(Class teaching art).doc
- 大明抗倭援朝战争(三)(Daming Anti Japanese Korean War (three)).doc
- 大话水浒(lying Water Margin).doc
- 大话水浒端午节答案(Big Water Dragon Boat Festival answer).doc
- 大连理工建筑考研试题(Dalian construction test).doc
- 大集权下的大改革(The big reform of centralization).doc
- 大野智万字访谈(Ohno Satoshi words interview).doc
- 2024高考物理一轮复习规范演练7共点力的平衡含解析新人教版.doc
- 高中语文第5课苏轼词两首学案3新人教版必修4.doc
- 2024_2025学年高中英语课时分层作业9Unit3LifeinthefutureSectionⅢⅣ含解析新人教版必修5.doc
- 2024_2025学年新教材高中英语模块素养检测含解析译林版必修第一册.doc
- 2024_2025学年新教材高中英语单元综合检测5含解析外研版选择性必修第一册.doc
- 2024高考政治一轮复习第1单元生活与消费第三课多彩的消费练习含解析新人教版必修1.doc
- 2024_2025学年新教材高中英语WELCOMEUNITSectionⅡReadingandThi.doc
- 2024_2025学年高中历史专题九当今世界政治格局的多极化趋势测评含解析人民版必修1.docx
- 2024高考生物一轮复习第9单元生物与环境第29讲生态系统的结构和功能教案.docx
- 2024_2025学年新教材高中英语UNIT5LANGUAGESAROUNDTHEWORLDSect.doc
最近下载
- 会计学原理23版 英文版课件WildFAP23eCh05PPT.pptx
- 华为公司职类职种职级体系的划分及职业发展通道设计.pdf VIP
- 建筑解析流水别墅.pptx
- 2025届高三英语复习语法填空专题(24张PPT).pptx VIP
- 基于PLC的磨矿控制系统设计.docx
- 有限元分析论文.doc VIP
- 苏教版小学科学五年级上册第四单元《水在自然界的循环》大单元教学设计(含练习).docx
- 聚氯乙烯热收缩膜标签验收标准.doc VIP
- 2023年安徽省高中学业水平合格性考试数学试卷真题(含答案详解) (2).pdf VIP
- 2025届江苏省南菁高级中学物理高一第一学期期中达标检测模拟试题含解析.doc
文档评论(0)