AliasMatch regex syntax

Can someone point me towards why this AliasMatch regex isn't working (throwing a 404, not server error):

AliasMatch (?i)^/scripts/(\w+)/admin/(\w+).js \cms\modules\$1\scripts\admin\$2.js

I am trying to match:

/scripts/analytics/admin/index.js

-------------Problems Reply------------

I think you need to escape the .. Try this

AliasMatch (?i)^/scripts/(\w+)/admin/(\w+)\.js \cms\modules\$1\scripts\admin\$2.js

I needed to swap the backslashes for forward slashes (Windows)

AliasMatch ^/scripts/(\w+)/admin/(\w+)\.js /cms/modules/$1/scripts/admin/$2.js

Category:regex Views:0 Time:2011-05-25

Related post

  • Variable order regex syntax 2009-03-31

    Is there a way to indicate that two or more regex phrases can occur in any order? For instance, XML attributes can be written in any order. Say that I have the following XML: <a href="home.php" class="link" title="Home">Home</a> <a hre

  • Perl regex syntax generation 2010-08-09

    This is a follow up to the question posted here: http://stackoverflow.com/questions/3358361/perl-regex-syntax The results from that discussion yielded this script: #!/usr/bin/env perl use strict; use warnings; my @lines = <DATA>; my $current_la

  • Why does VIM have its own regex syntax? 2010-08-30

    Why do you have to make your regex "very magic" so that you don't have to escape your capture quotes? And if you set your environment to very magic, you are non-standard and may have compliance issues. I am just wondering why vim uses a different reg

  • Do all languages support any common regex syntax? 2010-09-08

    Is there any regex standard ? Is PCRE supported by all regex engines ? Thanks for replies --------------Solutions------------- Regular-Expressions.info has a nice feature comparison table. There you can see that the basic syntax components (character

  • Regex Syntax changes between POSIX and PCRE 2011-01-19

    We are currently in the process of upgrading our Varnish Cache servers. As part of the process, we upgraded only one of them to see how it behaves compared to the older versions. Some of the major changes made in this new version is changing the rege

  • Regex syntax highlighting question 2011-03-10

    Hey all, I' brand new to Regex and I've read several of the questions on here that are similar to what I'm looking for but I still cant wrap my head around it. This is for syntax hightlighting, and I want to do it simlar to XAML where the attributes

  • Regex syntax hightlighting question follow up 2011-03-11

    Hey all, this is a follow up to this question: Regex syntax highlighting question I’m not sure what the procedure is when a question is spawned off an answer to a previous question, so if this is the wrong way to go about it let me know. Basically, I

  • Sed and grep regex syntaxes differ 2011-08-31

    This is a part of my shell script, which I use to perform a recursive find and replace in the working directory. Backup and other utilities are in other functions, which are irrelevant to my problem. #!/bin/bash # backup function goes here # @param $

  • VIM Ruby Regex syntax highlighting with quotes 2011-10-19

    I wonder what I can do to fix the Ruby Regex syntax highlighting when there are quotes in the Regex? Here is where the problem is: And compare it to the similar where there are no quotes: (I'm already using the latest vim-ruby plugin). --------------

  • What is the regex syntax for a file name with spaces 2011-10-26

    I'm using a custom blog syndication tool and having problems in using the regex syntax. Example: The original code <img src="http://www.mydomain.com/some image.png"> I tried: /\<img src\=\"http\:\/\/www\.mydomain\.com\/some\%20image\.png\"\

  • Haskell regex syntax 2011-12-14

    I'm having some trouble with regexes in haskell. Specifically: Prelude Text.Regex.Posix> "1" =~ "\d" :: Bool <interactive>:1:10: lexical error in string/character literal at character 'd' Prelude Text.Regex.Posix> "1" =~ "\\d" :: Bool Fal

  • mod_alias AliasMatch Regex - matching everything in a folder except two patterns? 2009-08-30

    I'd like to use AliasMatch to create an alias for everything within a folder, except for two (or more) specific regex patterns. For instance the following AliasMatch creates an alias for everything in the 'content' folder: AliasMatch /content(.*) /ho

  • Why does Visual Studio use such a strange regex syntax 2010-06-09

    Is there any reason why Visual Studio uses such a strange syntax (for instance in the search/replace dialog)? Instead of writing \s*(\w+) = new Process\(\) I have to write :b*{:a+} = new Process\(\). I am always struggling with this syntax - especial

  • Why does .NET and Visual Studio use different regex syntax? 2010-06-09

    Is there any reason why Visual Studio uses such a strange syntax (for instance in the search/replace dialog)? Instead of writing \s*(\w+) = new Process\(\) I have to write :b*{:a+} = new Process\(\). I am always struggling with this syntax - especial

  • Regex Syntax Validator 2010-07-31

    Does anybody know any tool for validating the syntax of an Regular Expression? I dont want to validate if it matches or not with some text but I want to see if there are syntax errors in the regex (missing parenthisis etc). Also, what about syntax hi

  • Boost wregex throwing exception, regex syntax wrong? 2010-10-29

    I have imported Boost library in to a .dll that I am using. I am trying to parse a string using: boost::wregex regPlayerAtSeat(L"*Governor: Seat.?[1-9].*"); But all I get is an 'interop service exception. Is the syntax of my regex wrong? Thanks, R. -

  • JavaScript RegEx Syntax Error 2010-12-15

    I have created the following Regular Expression in C# to extract tokens from a string in the format {token}. I developed the regex in C# and confirmed that it works. // c# var regex = new Regex( "\\{ (?>[^{}]+| \\{ (?<number>) | \\} (?<-n

  • Complete Regex syntax for Sql Server Management Studio 2011-06-24

    Is there a complete description of the regular expression syntax used in Sql Server Management Studio? There must be a way to do negative lookaheads, for example, but the find/replace dialog doesn't list one. --------------Solutions------------- SSMS

  • regex syntax diagram 2011-07-01

    I'm still new to reading regex and am finding it pretty hard to read. I remember finding a website before that would convert regex into a syntax digram (although I've tried several times to find it again, so am growing increasing concerned that I mig

Copyright (C) dskims.com, All Rights Reserved.

processed in 0.133 (s). 11 q(s)