regex - C# regular expression (replace) -
assume have string:
10,11,12,13,14,abc,def,ghi,66
i looking run regex against return 0-9 , "," characters, stripping else out.
i have looked @ regex.replace, isn't quite right it. code below:
regex reg = new regex(@"[0-9,]+"); string input = reg.replace(input, delegate(match m) { return string.empty; });
how can make work?
do want ^
in that?
input = regex.replace(input, @"[^0-9,]+", "");
Comments
Post a Comment