Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
要查找子字符串,我使用 regEx pattern = "^value\s\w+\s\d+$",其中 value 有时包含元字符。我只需要知道是否可以将值中的元字符不被解释为元字符?
pattern = "^value\s\w+\s\d+$"
尝试:
"^" + RegEx.Escape(value) + @"\s\w+\s\d+$"