An invalid regex pattern

后端 未结 5 2075
灰色年华
灰色年华 2021-02-07 01:52

I have a piece of code in c# that checks, if a value is a valid regex pattern.

Code is straight forward:

   try
   {
      System.Text.RegularExpressions.R         


        
5条回答
  •  星月不相逢
    2021-02-07 02:20

    Here's another one. Anything that ends in a single backslash (dangling backslash) is invalid.

    BOOM\
    

提交回复
热议问题