Visual Studio and .NET Framework Home
invalid TR1 regex syntax exception
Bruno van Dooren
9/3/2008 11:45:51 PM
User(s) can reproduce this bug
Using TR1 regexes in VC2008 SP1.
The TR1 implementation of regex throws a syntax exception on the following expression:
you could use it in a regular expression like this:
(a|) to indicate that a string contains at a certain point either
a or nothing
There are other ways to do this, but this syntax should be valid.
The .NET regular expression accept this syntax without a problem
Visual Studio 2008 Service Pack 1
Windows XP Professional
Operating System Language
Steps to Reproduce
using namespace std;
using namespace tr1;
int _tmain(int argc, _TCHAR* argv)
cout << ex.what();;
The construction of myRegex throws an exception
TAP Code (if applicable)
You can indicate your satisfaction with how Microsoft handled this issue by completing this quick
3 question survey
to post a comment.
Please enter a comment.
on 1/14/2009 at 7:29 PM
Thanks for reporting this bug. We have fixed it, and the fix will be available in VC10. Note that the fix was not present in the VC10 CTP, but it will be present in the next version of VC10 that you can get your hands on.
If you have any further questions, feel free to E-mail me at email@example.com .
Stephan T. Lavavej
Visual C++ Libraries Developer
on 9/4/2008 at 10:59 PM
Thanks for your feedback. We are escalating this bug to the product unit who works on that specific feature area. The team will review this issue and make a decision on whether they will fix it or not for the next release.
Visual Studio Product Team
to post a workaround.
Please enter a workaround.
on 9/4/2008 at 10:24 AM
? is the proper way to denote this behavior, so change a| to a?
© 2014 Microsoft