Question

I've thought I knew how to write basic regex. On my x64 pc in VS2008, C#, I'm writing the following regex:

private static readonly Regex TagRegex = new Regex(@"\{QTable\((?<key>(.*?))#(?<query>(.*?))#(?<columns>(.*?))#(?<heading>(.*?))#(?<tbl>(.*?))#(?<headers>(.*?))#(?<row>(.*?))\)\}", RegexOptions.Compiled | RegexOptions.Multiline | RegexOptions.ExplicitCapture | RegexOptions.CultureInvariant);

This regex should find all entries like:

{QTable(XXX#YYY#ZZZ#111#222#333#444)}

Enabling me to use named groups and pick each value key,query etc... And in my unit test + debug mode it works, even on my own 5.1 IIS (x86) where I deploy the app it works. However when I deploy on the production server it doesn't, it throws a ney not present in dictionary when trying to access the named groups.

Was it helpful?

Solution

Found the error. Of course a completely unrelated place. Nothing wrong with the regex :). Sorry for any inconvenience.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top