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

          Regex quick reference

          Posted on 2012-06-13 16:06 Milo的海域 閱讀(227) 評論(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
          主站蜘蛛池模板: 三穗县| 徐州市| 上高县| 灵石县| 安平县| 浦北县| 乌拉特后旗| 南皮县| 孙吴县| 邓州市| 广州市| 菏泽市| 鲁山县| 枞阳县| 承德县| 马边| 合阳县| 南城县| 榆树市| 宜兰市| 汶川县| 永春县| 志丹县| 五莲县| 岢岚县| 海口市| 大连市| 新乡市| 鄯善县| 富阳市| 蕉岭县| 清河县| 安达市| 南康市| 纳雍县| 芦山县| 外汇| 太保市| 卓资县| 康平县| 宁城县|