隨筆 - 53, 文章 - 0, 評論 - 3, 引用 - 0
          數據加載中……

          summary of regular expression grammar

          There are not too much grammar. here is just the incomplete summary for the future reference.
          meta-character
          .                                any character
          |                                or
          ()                                grouping
          []                                character class
          [^]                                negative character class

          Greedy Quantifier
          ?                                optional
          *                                any amount
          +                                at least one
          lazy quantifier
          ??                               
          *?
          +?
          possessing quantifier
          ?+
          *+
          ++

          position related
          ^                                start ot the line
          \A                               
          $                                end of the line
          \Z
          \<                                start of the word
          \>                                end of the word
          \b                                start or end of the word

          non-capturing group                (?:Expression)
          non-capturing atomic group        (?>Expression)
          positive lookahead                (?=Expression)
          negative lookahead                (?!Expression)
          positive lookbehind                (?<=Expression)
          negative lookbehind             (?<!Expression)

          \Q start quoting
          \E end quoting

          mode modifier
          (?modifier)Expression(?-modifier)
          valid modifier
          i            case insensitive match mode
          x             free spacing
          s            dot matches all match mode
          m            enhanced line-anchor match mode
          (?modifier:Expression)

          comments:
          (?#Comments)



          posted on 2008-07-16 17:06 InPractice 閱讀(81) 評論(0)  編輯  收藏


          只有注冊用戶登錄后才能發表評論。


          網站導航:
           
          主站蜘蛛池模板: 宜君县| 北票市| 土默特左旗| 白水县| 阿克苏市| 襄樊市| 都江堰市| 平南县| 南木林县| 黑山县| 诸暨市| 凉山| 新安县| 阳朔县| 高青县| 安阳市| 镇平县| 武陟县| 屯昌县| 兴化市| 大港区| 太保市| 安陆市| 乌拉特中旗| 车致| 泾川县| 舒兰市| 罗平县| 山阴县| 镇康县| 木兰县| 龙山县| 隆林| 营口市| 毕节市| 平利县| 松江区| 红安县| 五华县| 自治县| 昆明市|