zoukankan      html  css  js  c++  java
  • re正则表达式13_review of regex symbols

    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.

    • dw, and s match a digit, word, or space character, respectively.

    • DW, 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.

  • 相关阅读:
    HDU1263(map)
    Let the Balloon Rise HDU
    PAT甲级1007
    PAT乙级1041
    PAT乙级1037
    PAT乙级1031
    PAT乙级1025
    Hanoi(栈实现)
    《全球资产配置》读后感 读书笔记
    《与内心的恐惧对话》读后感 读书笔记
  • 原文地址:https://www.cnblogs.com/webRobot/p/5223690.html
Copyright © 2011-2022 走看看