当前位置:网站首页>Regular expression Basics
Regular expression Basics
2022-06-30 09:56:00 【Shimmering sea】
Regular expressions describe a pattern of string matching , Also known as regular expressions
Do these four things with strings : Replace | Division | matching | extract Preferred regular
\d An arbitrary number 0~9
\D A non number except 0~9
\w A letter a~z|A~Z|0~9
\W A non letter
\s A space
\S A non space
[] Character selector Match only one “ character ” [a-c]:a To c Any character between [ac]:a and c Any character between
{} Range modifier ( Modify how many times the previous symbol appears ) \d{1,2}: Most appear 2 individual , At least a 1 individual
() String selector grouping (com|org)
+ Modifier ( The last symbol before the modifier appears at least 1 The maximum number of occurrences is infinite )
* Modifier ( The last symbol before the modifier appears at least 0 The maximum number of occurrences is infinite )
? Modifier ( The last symbol before the modifier appears at least 0 Most times 1 Time ) If ? Write after modifier , Represents using non greedy mode
^ If used in [^] Take the opposite Single use represents matching from left to right
$ Using alone means matching from right to left
. Match all characters
\ Escape character ( Require regular expressions to contain regular special characters )
^()$ Boundary delimiter ( A complete string match is required ) ^(hello)$
Three modes
- Greedy mode
- Non greedy model use ? modification
- Exclusive mode
边栏推荐
猜你喜欢

Installing Oracle database process in windows2007 on VM

Add / delete query of topic

Brève description du collecteur d'ordures G1

NTP of Prometheus monitoring_ exporter

9.缓存优化

P. Summary of NP, NPC, NP hard and other issues

【Ubuntu-redis安装】

浏览器复制的网址粘贴到文档是超链接
![[new book recommendation] cleaning data for effective data science](/img/42/1258694fc55a178a666391669a67ad.png)
[new book recommendation] cleaning data for effective data science

Object detection yolov5 open source project debugging
随机推荐
Recommend a very easy-to-use network communication framework HP socket
CRF (conditional random field) learning summary
Thrift easy to use
Flume learning II - Cases
Forrester senior analyst: five important trends in the development of the hyper convergence market
目标检测yolov5开源项目调试
Enterprise data center "cloud" transformation solution
Machine learning note 9: prediction model optimization (to prevent under fitting and over fitting problems)
Train an image classifier demo in pytorch [learning notes]
Techtarget: Interpretation of the basic concept of super fusion cloud
Shenhe thermomagnetic: Super fusion dual active cluster solution for MES system
MySQL directory
utils session&rpc
Differences and relationships among hyper convergence, software defined storage (SDS), distributed storage and server San
MySQL internal component structure
Difference between bow and cbow
八大排序(二)
抽象类和接口
NTP of Prometheus monitoring_ exporter
JWT expiration processing - single token scheme