posts - 88, comments - 3, trackbacks - 0, articles - 0
            BlogJava :: 首頁 :: 新隨筆 :: 聯系 :: 聚合  :: 管理

          Regex quick reference

          Posted on 2012-06-13 16:06 Milo的海域 閱讀(226) 評論(0)  編輯  收藏 所屬分類: PHP

          [abc]     A single character: a, b or c
          [^abc]     Any single character but a, b, or c
          [a-z]     Any single character in the range a-z
          [a-zA-Z]     Any single character in the range a-z or A-Z
          ^     Start of line
          $     End of line
          \A     Start of string
          \z     End of string
          .     Any single character
          \s     Any whitespace character
          \S     Any non-whitespace character
          \d     Any digit
          \D     Any non-digit
          \w     Any word character (letter
          , number, underscore)
          \W     Any non-word character
          \b     Any word boundary character
          ()     Capture everything enclosed
          (a|b)     a or b
          a?     Zero or one of a
          a*     Zero or more of a
          a+     One or more of a
          a{
          3}     Exactly 3 of a
          a{
          3,}     3 or more of a
          a{
          3,6}     Between 3 and 6 of a
          主站蜘蛛池模板: 津南区| 资溪县| 琼中| 玉环县| 德化县| 丰原市| 禹州市| 壤塘县| 博客| 棋牌| 上蔡县| 新乡市| 中江县| 大方县| 蒲城县| 资中县| 襄樊市| 肥城市| 北安市| 清原| 乐山市| 寿光市| 昌平区| 思茅市| 遂宁市| 明水县| 绿春县| 绩溪县| 六枝特区| 浮梁县| 纳雍县| 阿巴嘎旗| 凭祥市| 沿河| 诸暨市| 蚌埠市| 红安县| 西峡县| 乐业县| 鹿邑县| 左贡县|