How to simulate regular expressions in LINQ-to-SQL

后端 未结 5 1609
生来不讨喜
生来不讨喜 2020-12-08 12:20

I have a database table with customer account numbers. Within the same table are test accounts that don\'t match the production formatting: say, \'A1111\' is production but

5条回答
  •  感动是毒
    2020-12-08 13:06

    Could you replace the Regex.IsMatch with

    where cust.AcctNum.StartsWith(ProductionMask)
    

    Or Contains / EndsWith depending on your needs

提交回复
热议问题