Just quick here, does anyone know a good regex for a percentage? Including 2 decimal places, i.e. 15.22%. I want to put it inside the regularexpressionvalidator in ASP.NET.
This takes 0.00% -100.00%, including any number of leading zeros:
^0*(100\.00|[0-9]?[0-9]\.[0-9]{2})%$
(\d+(\.\d+)?%)
That should work.
, @Lucero:
2
^[0-9]+\.[0-9]{2}%$
2 ( ), . .
^[0-9]+(\.[0-9]{2})?%$
\d\d\.\d\d%
:
\d\d(\.\d\d)?%
\d{1,2}(\.\d\d)?%
, 100%
(100|\d{1,2}(\.\d\d)?)%
Source: https://habr.com/ru/post/1770937/More articles:Float List Comparison - ocamlCan a loaded JAR be deleted by a Java process? - javaJava / Spring: Beans to view - javaIs it possible to write a regular expression to test this: - c #Solution as part of solutions vs 2010 - c #How to run Spring applications offline? - javaBlog implementation with MongoDB and NoRM: relationships? - asp.net-mvcHTML processing - pythonAndroid Multicast disables listening - androidIs it possible to save to ftp txt directly from the Store procedure in Oracle? - oracleAll Articles