Review of Regex Symbols

This chapter covered a lot of notation, so here’s a quick review of what you learned:

  • The ? matches zero or one of the preceding group.

  • The * matches zero or more of the preceding group.

  • The + matches one or more of the preceding group.

  • The {n} matches exactly n of the preceding group.

  • The {n,} matches n or more of the preceding group.

  • The {,m} matches 0 to m of the preceding group.

  • The {n,m} matches at least n and at most m of the preceding group.

  • {n,m}? or *? or +? performs a nongreedy match of the preceding group.

  • ^spam means the string must begin with spam.

  • spam$ means the string must end with spam.

  • The . matches any character, except newline characters.

  • \d\w, and \s match a digit, word, or space character, respectively.

  • \D\W, and \S match anything except a digit, word, or space character, respectively.

  • [abc] matches any character between the brackets (such as ab, or c).

  • [^abc] matches any character that isn’t between the brackets.

re正则表达式13_review of regex symbols的更多相关文章

  1. 一款免费好用的正则表达式工具:Regex Match Tracer

    推荐分享:一款免费好用的正则表达式工具:Regex Match Tracer  v2.1.5  free version 下载地址:Regex Match Tracer

  2. 正则表达式(Regular Expression, RegEx)学习入门

    1. 概述 正则表达式(Regular Expression, RegEx)是一种匹配模式,描述的是一串文本的特征. 正如自然语言中高大.坚固等词语抽象出来描述事物特征一样,正则表达式就是字符的高度抽 ...

  3. 通用 正则表达式 C# (.NET)Regex 总结

    [参考]C#正则表达式Regex类的用法    语法: 1. new System.Text.RegularExpressions.Regex("\\$\\d{1,2}\\}"). ...

  4. Java正则表达式java.util.regex类的简单使用

    1.什么是正则表达式? 正则表达式(regular expression)是根据字符串集合内每个字符串共享的共同特性来描述字符串集合的一种途径.正则表达式可以用于搜索.编辑或者处理文本和数据. Jav ...

  5. 正则表达式_matches(Regex)

    [0-9a-zA-Z.%+-] 匹配中括号中的 0-9 或者 a-z 或者 A-Z 或者 . 或者 % 或者 + 或者 - $p = "111,222,333"$p -match ...

  6. C#正则表达式Regex类

    C#正则表达式Regex类的使用 C#中为正则表达式的使用提供了非常强大的功能,这就是Regex类.这个包包含于System.Text.RegularExpressions命名空间下面,而这个命名空间 ...

  7. C#正则表达式Regex类的使用

    C#中为正则表达式的使用提供了非常强大的功能,这就是Regex类.这个包包含于System.Text.RegularExpressions命名空间下面,而这个命名空间所在DLL基本上在所有的项目模板中 ...

  8. (译)JavaScript 中的正则表达式(RegEx)实操——快速掌握正则表达式,伴有随手可练的例子————(翻译未完待续)

    (原文:https://blog.bitsrc.io/a-beginners-guide-to-regular-expressions-regex-in-javascript-9c58feb27eb4 ...

  9. 【Unity|C#】基础篇(18)——正则表达式(Regex类)

    [学习资料] <C#图解教程>:https://www.cnblogs.com/moonache/p/7687551.html 电子书下载:https://pan.baidu.com/s/ ...

随机推荐

  1. SharedPreferences保存数据

    1.使用SharedPreferences保存数据方法如下: //实例化SharedPreferences对象(第一步) SharedPreferences mySharedPreferences= ...

  2. 素数筛 poj 2689

    素数筛 #include<stdio.h> #include<string.h> #include<algorithm> using namespace std; ...

  3. d3-画雷达图-圆形弧线

    本文转载 终极效果 源码 index.html <!DOCTYPE html> <html> <head> <meta http-equiv="Co ...

  4. 系统间通信(8)——通信管理与RMI 上篇

    1.概述 在概述了数据描述格式的基本知识.IO通信模型的基本知识后.我们终于可以进入这个系列博文的重点:系统间通信管理.在这个章节我将通过对RMI的详细介绍,引出一个重要的系统间通信的管理规范RPC, ...

  5. 【codevs1012】最大公约数和最小公倍数

    题目描述 Description 输入二个正整数x0,y0(2<=x0<100000,2<=y0<=1000000),求出满足下列条件的P,Q的个数 条件:  1.P,Q是正整 ...

  6. ffmpeg 转成MP3采样率8000

    using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; usin ...

  7. Python3 捕捉异常

    可以通过try/except语句来实现捕获异常,如下: bpython version 0.15 on top of Python 3.5.1+ /usr/bin/python3 >>&g ...

  8. Hive 的分桶 & Parquet 概念

    分区 & 分桶 都是把数据划分成块.分区是粗粒度的划分,桶是细粒度的划分,这样做为了可以让查询发生在小范围的数据上以提高效率. 分区之后,分区列都成了文件目录,从而查询时定位到文件目录,子数据 ...

  9. ubuntu安装eclipse tomcat的参考网址

    Neither the JAVA_HOME nor the JRE_HOME environment variable is defined解决 - Linux操作系统:Ubuntu_Centos_D ...

  10. SQL Server附加数据库时失败,提示:“未重新生成日志,因为有不止一个日志文件”

    这个只能是试一下的方法,但不一定能成功,可以尝试如下几个方法: 1.登录远程桌面,然后以.登录SQL Server,并以Windows身份登录,然后再附加数据库时把日志文件删除. 2.试下这个脚本: ...