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. android中通话录音

    file = new File(Environment.getExternalStorageDirectory(), this.incomeNumber + System.currentTimeMil ...

  2. 链栈的C语言实现

    /* 功能:栈的链表实现 Author:lxm Date: 20160511 */ #include <stdio.h> #include <stdlib.h> #define ...

  3. tomcat 的安全规范

    下面来说一下,日常工作当中我们需要注意的一些tomcat的安全规范: 一:telnet管理端口的保护 类别 配置内容及其说明 标准配置 备注 Telnet 管理端口的保护 (强制) (1)配置文件中的 ...

  4. 初探psutil

    系统性能信息模块psutil 1,psutil简介 psutil是一个跨平台能够轻松获取系统的进程和系统利用率,主要应用在系统监控,分析和限制系统资源以及进程管理.它实现了很多系统管理的命令,如ps, ...

  5. 哈希 poj 3274

    n个牛 二进制最多k位 给你n个数 求max(j-i)&&对应二进制位的和相同 7    1  1  1  倒的 6    0  1  1 7    1  1  1 2    0  1 ...

  6. Eclipse自动调整格式

    Eclipse 编写Java代码的时候,使用右键Source -> Format 后,将自动调整格式,若想要{ 单独占一行,则可以自己定义相关格式模板 新建 CodeFormatter.xml ...

  7. 100114D

    这道题用暴力水过了,蒟蒻是这么想的:枚举两个端点,找最小值,因为shift只能用一次,但是这样10^9*2.5要t,所以减掉只有一个黑点的情况,然后复杂度变为10^9*0.6 #include< ...

  8. js-图标控件

    1.highcharts http://www.hcharts.cn/ 2.echarts echarts.baidu.com

  9. MySQL 1045登录失败

    当你登录MySQL数据库出现:Error 1045错误时(如下图),就表明你输入的用户名或密码错误被拒绝访问了,最简单的解决方法就是将MySQL数据库卸载然后重装,但这样的缺点就是就以前的数据库中的信 ...

  10. 【转】ListView学习笔记(二)——ViewHolder

    在android开发中Listview是一个很重要的组件,它以列表的形式根据数据的长自适应展示具体内容,用户可以自由的定义listview每一列的布局,但当listview有大量的数据需要加载的时候, ...