I have a scenario where I have to remove certain characters from a price string using C#.
I\'m looking for a regular expression to remove these characters or somethi
You can use following regular expression
Case 1: if ( Ex.TAX ) is constant, you can just remove the text using string function String.Replace.
Case 2: if you require number which contains only , following is the regex you can use to extract the same
[0-9,]{1,}
Case 3: if ( is there always there after number, the following regex can be used
\d.*(?=\()
following is c# code for regex
public static Regex regex = new Regex(
"\\d.*(?=\\() ",
RegexOptions.IgnoreCase
| RegexOptions.CultureInvariant
| RegexOptions.IgnorePatternWhitespace
| RegexOptions.Compiled
);
//// Capture the first Match, if any, in the InputText
// Match m = regex.Match(InputText);