From: Christophe Jaillet
mod_rewrite uses the Perl Compatible
+
.
c.t
will match cat
,
-cot
, cut
, etc.+
a+
matches a
, aa
,
-aaa
, etc*
a*
matches all the same things
-a+
matches, but will also match an empty string.?
colou?r
will match color
and colour
..
c.t
will match cat
, cot
,
+ cut
, etc+
a+
matches a
, aa
,
+ aaa
, etc*
a*
matches all the same things a+
matches,
+ but will also match an empty string?
colou?r
will match color
and
+ colour
\
\.
will match .
(dot) and not any single
+ character as explain above^
^a
matches a string that begins with
-a
$
a$
matches a string that ends with
-a
.( )
(ab)+
-matches ababab
- that is, the +
applies to the group.
-For more on backreferences see below.[ ]
c[uoa]t
matches cut
,
-cot
or cat
.[^ ]
c[^/]t
matches cat
or c=t
but not c/t
^
^a
matches a string that begins with a
$
a$
matches a string that ends with a
( )
(ab)+
matches ababab
- that is, the
+ +
applies to the group. For more on backreferences see
+ below[ ]
c[uoa]t
matches cut
, cot
or
+ cat
[^ ]
c[^/]t
matches cat
or c=t
but
+ not c/t
In !
character can be