开发者

C# - Lost in Regex - Matching groups on different machines

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&开发者_Go百科gt;(.*?))#(?<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.


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜