| PCRE with mod rewrite
|
dmwaff

msg:4230993 | 2:41 pm on Nov 16, 2010 (gmt 0) | Anyone now if mod_rewrite engine includes an underscore with \w, like Perl, some engines don't as I understand it? I know rewrite supports the char class alnum. \w = [a-zA-Z0-9_] [:alnum:] = [a-zA-Z0-9] RewriteCond %{QUERY_STRING} f=(\w+) OR RewriteCond %{QUERY_STRING} f=([[:alnum:]_]) I'll have time to set up a test HTTP Server later but not today, so I can't test myself. Apologizes! I hate asking questions I can get the answer to myself but I need to know today. Cheers.
|
sublime1

msg:4231030 | 4:07 pm on Nov 16, 2010 (gmt 0) | Apache supports PCRE, however it doesn't (appear to) know about things like [:alnum:] used. I was able to use \w and \d, for example. [httpd.apache.org...] Tom
|
jdMorgan

msg:4231676 | 10:55 pm on Nov 17, 2010 (gmt 0) | When in doubt, use the old-style POSIX expressions for best results (and portability). Use of the [NC] flag on the RewriteCond or RewriteRule (as applicable) can make this slightly less painful, so as to avoid having to specify both upper- and lower-case ranges. Jim
|
|
|