"\V" is not a valid Regular expression sequence, but "\v" is. Try this:
string pattern = @"[0-9]*,\v[0-9]";
But that won't match your test data at all - because it contains no vertical whitespace, and will only pick up the first digit after the comma.
Get a copy of
Expresso[
^] - it's free, and it examines and generates Regular expressions.
Quote:
My goal is to remove the last zeros from the string.
1,56700 --> 1,567
Try this:
[0-9]*,[0-9]+?(?=0*$)
It treats the last zeros (if any) and the end of string as a not-included suffix, but allows zeros in the "body":
1506700 -> 1,5067