当前位置:网站首页>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
边栏推荐
- Recommend a very easy-to-use network communication framework HP socket
- 事件对象的说明》
- Stack Title: String decoding
- MySQL internal component structure
- 机械臂速成小指南(五):末端执行器
- Techtarget: Interpretation of the basic concept of super fusion cloud
- Torch learning summary
- Shell script multi loop experiment
- JUL简介
- Task summary in NLP
猜你喜欢

Dart development skills

Enterprise data center "cloud" transformation solution

Flume learning II - Cases

Forrester senior analyst: five important trends in the development of the hyper convergence market

Deberta (decoding enhanced Bert with distinguished attention)

将小程序容器技术应用到物联网IoT生态建设中

Techtarget: Interpretation of the basic concept of super fusion cloud

NFS shared services

【新书推荐】Cleaning Data for Effective Data Science

Flutter 中的 ValueNotifier 和 ValueListenableBuilder
随机推荐
Deberta (decoding enhanced Bert with distinguished attention)
Self service terminal development process
MCU firmware packaging Script Software
Alibaba billion concurrent projects in architecture
11.自定义hooks
CRF (conditional random field) learning summary
Network based BGP
Object detection yolov5 open source project debugging
[Ubuntu redis installation]
Theme Studio(主题工作室)
Framework program of browser self-service terminal based on IE kernel
抽象类和接口
单片机 MCU 固件打包脚本软件
NER – Named Entity Recognition Summary
机器学习笔记 九:预测模型优化(防止欠拟合和过拟合问题发生)
Read the difference and connection between hyperfusion and private cloud
Flutter的特别之处在哪里
安装和使用
UltraEdit delete empty line method
Ocx control can be called by IE on some computers, but can not be called by IE on some computers