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.
我正在搜索匹配字符串中每个字母的正则表达式模式。
我有以下字符串:
给定字符串 --> 想要的字符串
- 225S225M --> SM - 225S225M225L --> SML
请问,谁能帮帮我?我希望字符串中的每个字母都具有一个模式。
这将简单地删除任何非数字字符并返回字符串的所有剩余部分
Dim result = Regex.Replace(second, "[0-9]", "") Console.WriteLine(result)