^[0-9]([.,][0-9]{1,3})?$
It allows:
0
1
1.2
1.02
1.003
1.030
1,2
1,23
1,234
BUT NOT:
.1
,1
12.1
12,1
1.
1,
1.2345
1,2345
More Related Contents:
- extract number out strings c# [closed]
- RegEx to remove key and certificate headers and footers [duplicate]
- c# Regular Expression for the text below? [closed]
- How to convert numbers between hexadecimal and decimal
- Get string between two strings in a string
- Using RegEx to balance match parenthesis
- Using String Format to show decimal up to 2 places or simple integer
- How to keep the delimiters of Regex.Split?
- How to find multiple occurrences with regex groups?
- Getting overlapping regex matches in C#
- C# Regex for Guid
- Regex: C# extract text within double quotes
- .Net regex matching $ with the end of the string and not of line, even with multiline enabled
- How do I filter all HTML tags except a certain whitelist?
- Why \b does not match word using .net regex
- RegEx for an IP Address
- Convert string to decimal, keeping fractions
- Regex word boundary expressions
- Regex to match all us phone number formats
- How to remove numbers from string using Regex.Replace?
- Rounding down to 2 decimal places in c#
- .Net regex: what is the word character \w?
- Canadian postal code validation
- Regex to match a word with + (plus) signs
- c# regex matches example
- Regex Non-Greedy (Lazy)
- using static Regex.IsMatch vs creating an instance of Regex
- Splitting a string in C#
- regex to split line (csv file)
- How do I convert a decimal to an int in C#?