char pat[] = {"(?<=\\D|^)(1[358]\\d{9})(?=\\D|$)"}; boost::regex reg(pat);
string pat = @"(?<=\D|^)(1[358]\d{9})(?=\D|$)"; string myinfo= "custom name: name1;tel:+86 18601234567;addr:beijing."; Regex rg = new Regex(pattern); MatchCollection mc = rg.Matches(myinfo);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)