当前位置:网站首页>Regular Expression Basics
Regular Expression Basics
2022-07-31 05:47:00 【not used to having you】
1. Regular expressions, also known as regular expressions.
English: Regular Expression, often abbreviated as regex, regexp or RE in code), a concept in computer science.Regular expressions are usually used to retrieve and replace text that matches a certain pattern (rule).
Regular Expression_Baidu Encyclopedia (baidu.com)
As I understand it, the correct rules are arranged correctly according to the rules you set.
2. Features of regular expressions:
a. Very flexible, logical and functional;
b. Complex control of strings can be achieved quickly and in a very simple manner.
c. For newcomers, it is rather obscure and difficult to understand.
| () | Like math, it means it's a whole |
| ^ | matches the beginning of the input string |
| $ | matches the end of the input string |
| . | Wildcard [represents any character][does not match newline] |
| * | Matches 0 or more times |
| + | Match 1 or more times |
| \ | Escape characters |
| | | A choice between two items |
6.Modifier
| /i | Case insensitive |
| /A | Matching rules must match from the beginning |
| /s | will match all characters |
| /x | Whitespace characters in regular expressions are ignored |
边栏推荐
猜你喜欢
随机推荐
初识正则表达式
Oracle数据库中的“limit”查询
If the account number or password is entered incorrectly for many times, the account will be banned.
实验8 DNS解析
Sword Point Offer Special Assault Edition ---- Day 2
uni-app进阶之自定义【day13】
NFT:数字所有权的核心
C语言实验四 循环结构程序设计(一)
PAT_乙级_真题练习_1007_素数对猜想
对递归的一些感悟
C语言实验二 数据类型、运算符和表达式
leetcode-每日一题873. 最长的斐波那契子序列的长度(哈希和二分)
【C语言3个基本结构详解——顺序、选择、循环】
剑指offer基础版 --- 第22天
12 【nextTick 过渡与动画】
Flink sink redis writes to Redis
11 【组件通信】
代码块、Package,Import,封装(第六天)
Error: Cannot find module ‘D:\Application\nodejs\node_modules\npm\bin\npm-cli.js‘
Redis的初识









