Forum Moderators: phranque

Message Too Old, No Replies

syntax

         

wilderness

5:28 pm on Jan 9, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Seem to recall that I need to make a correction in the use "))" in the line below?
Anybody know?

RewriteCond %{HTTP_USER_AGENT} (04b)¦SV1))$

Thanks in advance.

Don

phranque

4:28 am on Jan 10, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



it depends on what you are trying to match with your regular expression and how you are using the regex capturing group.
just a guess, but maybe you need to escape the literal closing parentheses?
RewriteCond %{HTTP_USER_AGENT} (04b\)¦SV1\))$

which should match HTTP_USER_AGENT ending in "04b)" or "SV1)"

wilderness

6:55 am on Jan 10, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Many thanks.

I had some nagging memory that concecutive use of the parenthese caused a glitch.

phranque

7:27 am on Jan 10, 2008 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



it is not the consecutive parentheses that cause the problem.
it is the reserved character that usually has a special meaning but is used in a literal sense so it needs escaping.
the special characters are:
\, +, ., *, {, }, [, ],?, ^, $, (, )