当前位置:网站首页>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
边栏推荐
- Mysql database learning 1
- Based on svelte3 X desktop UI component library svelte UI
- 工作小记: sendto失败 errno 22
- NTP of Prometheus monitoring_ exporter
- 机械臂速成小指南(四):机械臂关键部件之减速机
- Enterprise data center "cloud" transformation solution
- Redis docker master-slave mode and sentinel
- 训练一个图像分类器demo in PyTorch【学习笔记】
- Datatabletomodellist entity class
- 机器学习笔记 九:预测模型优化(防止欠拟合和过拟合问题发生)
猜你喜欢

训练一个图像分类器demo in PyTorch【学习笔记】

云技能提升好伙伴,亚马逊云师兄今天正式营业

Xlnet (generalized autorefressive trainingfor language understanding) paper notes

prometheus 监控之 ntp_exporter

Deberta (decoding enhanced Bert with distinguished attention)

Plan the IT technology route for the new year? Let's learn about Gartner infrastructure hype cycle

布隆过滤器

Differences and relationships among hyper convergence, software defined storage (SDS), distributed storage and server San

Notes on masking and padding in tensorflow keras

Pytorch graduate warm LR installation
随机推荐
云技能提升好伙伴,亚马逊云师兄今天正式营业
MySQL directory
CRF (conditional random field) learning summary
ABAP-时间函数
Shell script functions
Redis docker 主从模式与哨兵sentinel
Train an image classifier demo in pytorch [learning notes]
How to build a private cloud and create a hybrid cloud ecosystem?
Cftpconnection:: getfile() download FTP server files and related parameter descriptions
What is the difference between ZigBee, Bluetooth and WiFi (copy and reprint)
Dart development skills
How to reduce the delay in live broadcast in the development of live broadcast source code with goods?
Oracle cross database replication data table dblink
utlis 内存池 对象池
Forrester senior analyst: five important trends in the development of the hyper convergence market
Plan the IT technology route for the new year? Let's learn about Gartner infrastructure hype cycle
UltraEdit delete empty line method
Abstract classes and interfaces
【Ubuntu-MySQL8安装与主从复制】
Mysql database learning 1