AliasMatch regular expression grouping

AliasMatch regular expression grouping

am 07.11.2005 17:20:03 von mboedick

The documentation for AliasMatch refers to "standard regular expressions"
but is there any reference for exactly what syntax is allowed in AliasMatch
directives?

Is there a non-grouping version of parentheses, where the contents are
not saved for later substitutions? Like (?:) in the Python re module.

Is there any way to specify an optional group by following it with a
question mark such as:

AliasMatch "^/a/b/(c/)?d" /x/y/z

Thanks,
--
Matthew M. Boedicker http://mboedick.org

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org

Re: AliasMatch regular expression grouping

am 07.11.2005 17:31:24 von Joshua Slive

On 11/7/05, Matthew M. Boedicker wrote:
> The documentation for AliasMatch refers to "standard regular expressions"
> but is there any reference for exactly what syntax is allowed in AliasMat=
ch
> directives?
>
> Is there a non-grouping version of parentheses, where the contents are
> not saved for later substitutions? Like (?:) in the Python re module.
>
> Is there any way to specify an optional group by following it with a
> question mark such as:
>
> AliasMatch "^/a/b/(c/)?d" /x/y/z

If you are using 2.x, then the answer is here:
http://httpd.apache.org/docs/2.0/glossary.html#regex
Apache uses PCRE (the same library used by python, if my memory serves
me correctly).

In 1.3, regex is provided either by the HSRegex library, or by your
systems extended regex library, depending on how it is compiled. The
regexes are less powerful, resembling what you get in egrep.

Joshua.

------------------------------------------------------------ ---------
The official User-To-User support forum of the Apache HTTP Server Project.
See for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org