RegExpress wrong
C#
2
Posts
2
Posters
0
Views
1
Watching
-
I want to get the string from text string regText = @"(?:+86)?\d{11}"; such as text "+8613812345678" or "13812345678" I want to get the string "13812345678" But if the text is started with the "+86", the string "+86" will be returned. Why wrong? :((
-
I want to get the string from text string regText = @"(?:+86)?\d{11}"; such as text "+8613812345678" or "13812345678" I want to get the string "13812345678" But if the text is started with the "+86", the string "+86" will be returned. Why wrong? :((
Escape the plus sign.
(?:\+86)?(?'Value'\d{11})
modified on Saturday, September 12, 2009 6:32 PM