C# Regex, Unrecognized escape sequence

后端 未结 1 1317
别那么骄傲
别那么骄傲 2020-12-03 19:09

I have strings in the following format

    _AUTO_(123,SomeString)

and I am trying to extract 123 from the above string using regex. The re

1条回答
  •  有刺的猬
    2020-12-03 19:45

    You don't need to escape the underscore (or, for that matter, the comma). Change your regex to:

    @"_AUTO_\(?(\d)+,"
    

    0 讨论(0)
提交回复
热议问题