开发者

C# regular expression '+' character

How do I use C# regular expressions to search for special characters (like '+' in this case)?

I would usually just use 开发者_如何学Python+ in perl / ruby, but I can't seem to figure out how to do this in C#. Thanks for any help you can provide.


use backslash to escape special characters


Backslashes work fine. As an alternative, you could use a character class for this and use [+] to match "+".

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜