You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by Mario Brandt <jb...@gmail.com> on 2012/01/19 16:43:03 UTC

Regex vocabulary mod rewrite

Hi,
it would be nice to have a list of the pattern characters from mod
rewrite. At http://httpd.apache.org/docs/2.2/rewrite/intro.html#regex
for many noobs in regex (including me) it is not that simple to find
the right regex.
Maybe a bit clearer would be:


Text:
  . Any single character
  [chars] One  of chars
  [^chars] None of chars
  text1|text2 text1 or text2
  - range if used between square brackets

Quantifiers:
  ? 0 or 1 of the preceding text
  ! at start of string means "negative pattern"
  * 0 or N of the preceding text (N > 0)
  + 1 or N of the preceding text (N > 1)
  {} minimum to maximum quantifier

Grouping:
  (text) Grouping of text

Anchors:
  ^ Start of line anchor
  $ End of line anchor

Escaping:
  \ char escape that particular char


Thoughs?


Cheers
Mario

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org