Bug 29704 - RegEx: Unrecognized escape sequence _
Summary: RegEx: Unrecognized escape sequence _
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: master
Hardware: PC All
: --- normal
Target Milestone: Untriaged
Assignee: marcos.henrich
Depends on:
Reported: 2015-05-04 10:25 UTC by Emmanuel Mathot
Modified: 2015-10-13 11:54 UTC (History)
2 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Emmanuel Mathot 2015-05-04 10:25:54 UTC
[ERROR] parsing '(S1.?\_[A-Z0-9]{1,3}\_[A-Z0-9]{1,5})\_.*' - Unrecognized escape sequence _.

In Mono 4, the new System.Text.RegularExpressions.RegexParser does not recognise the "\_" escaped character whereas it is supported by regular expression grammar.

I suppose this is due to the change of code to .Net of Microsoft.
Comment 1 Emmanuel Mathot 2015-07-02 04:10:35 UTC
same problem on all platform. Is there any plan to fix this issue?
Comment 2 marcos.henrich 2015-10-13 11:54:30 UTC
Hi Emmanuel,

Your are right this change was caused by using .NET regular expressions code.

We are not planning on diverging from .NET reference source behavior.