Help- Invalidl characters E9

Good morning, classmates.
I have this code in Epicor 9 that validates if a record contains invalid characters, it does not help if someone knows how to pass the code for Epicor10 ??? I would thank you a lot

----Epicor9-----

If (ttCustomer.ResaleID Matches “-”)
or (ttCustomer.ResaleID Matches “* ")
or (ttCustomer.ResaleID Matches "
~~.*”)
Then “ERROR”
Else ttCustomer.ResaleID

var patterns = new List<string>(){ "-", "* ", "~~.*"}
if(patterns.Any(o=>ttCustomer.ResaleID.Contains(o))) or
if(patterns.Any(ttCustomer.ResaleID.Contains))
3 Likes