I am using a Regex to find a pattern within a string. After I find a match I would then like to remove it from the existing string.
For example:
starting string ex: "Billed Hours (.5);"
converted string: "Billed Hours"
The regex pattern I am using is @"([a-z.]+);$" - Not sure if this is correct, I want to check that only whole numbers or decimals are within the parentheses. If the pattern matches then remove parentheses, the value inside as well as the following semi-colon.
This is what I have so far:
string testString = "Billed Hours (.5);"
testString = Regex.Replace(testString, @"\([a-z.]+\);$", "");
This is in C#.
Any ideas?