aindrea
Member
- Joined
- Jun 5, 2018
- Messages
- 23
- Programming Experience
- 1-3
I have a string entry as follows: inputString="2;2" which I match against a regular expression.
The problem is: it seems to match inspite of the fact that "2;2" ought not to match since it is definitely not a decimal number, and I have the intention to filter for decimals. What am I doing wrong?
C#:
inputString="2;2";
Regex regex = new Regex(@"\b[0-9]*\.*[0-9]+$");
Match match = regex.Match(inputString);
The problem is: it seems to match inspite of the fact that "2;2" ought not to match since it is definitely not a decimal number, and I have the intention to filter for decimals. What am I doing wrong?