[quoted text, click to view] sabinosa wrote:
> I am working with a RegularExpressionValidator in Visual Studio.NET.
Interesting! I didn't know that Visual Studio.NET supports Perl. I guess
there is always something new to learn.
[quoted text, click to view] > I would like to define a custom regular expression that ignores the
> letter case and therefore is case INsensitive. I have seen that the
> syntax might be something like "(?i)" or "/i".
Why don't you check the readily available documentation?
From "perldoc perlre":
Matching operations can have various modifiers. Modifiers that relate to
the interpretation of the regular expression inside are listed below.
Modifiers that alter the way a regular expression is used by Perl are
detailed in the section on "Regexp Quote-Like Operators" in the perlop
manpage and the section on "Gory details of parsing quoted constructs"
in the perlop manpage.
i Do case-insensitive pattern matching.
[quoted text, click to view] > However, when I try to
> use that as part of my regular expression (ex. (?i)^(CSV|ZIP|TXT)$)
This is not a regular expression. Well, it might be, but ...
[quoted text, click to view] > the result is a javascript error.
Your system must be badly screwed up. Why would perl report a javascript
error?
[quoted text, click to view] > The error says: "Syntax error in
> regular expression"
> (^(CSV|ZIP|TXT)$/i does not work)
At least the trailing /i is the correct syntax.
Please post a short, but selfcontained program that exposes the problem,
together with a description of what you expect the program to do versus what
behaviour you are observing. Then we may be able to determine if the problem
is with your code or your expectation.
[quoted text, click to view] > Any idea what I am doing wrong?
For once: not posting any actual code. How are we supposed to reproduce and
analyse your problem if you don't tell us how.
jue