so i have this reg ex
0*[0-9]\d*
which only accepts numbers, how could I accept only numbers, but have a minimum input of 5 numbers?
I will do what you want.
^\d{5,}$
Here is the template for you:
<expression>{length} <expression>{min,} <expression>{min,max}
In your case, it will be:
\d{5,}
See the sandbox .
To specify the minimum number of characters, use {n,} , where n is 5 in your example, so the regex will be \d{5,}
{n,}
n
String pattern = @"\d{5,}"; var result = Regex.Match("12345", pattern);
Source: https://habr.com/ru/post/954911/More articles:URLs not allowed: Facebook PHP login - urlHow to fix "java.lang.ClassCastException: com.android.layoutlib.bridge.android.BridgeContext cannot be added to the android.app.Activity exception" - androidself-defining function (also called lazy function definition) when using function declaration - javascriptThis URL is not allowed by application configuration. when using the Javascript SDK for Facebook - google-chromeIs Python list.extend () Order Presserving? - pythonxdebug track / trace php echo, print calls - debugginghow to disable x-axis and y-axis in google api line chart - google-apiConfigure Angularjs and CORS correctly using Apache, running the Flask api and Angularjs interface in a separate domain - angularjsThe query is returned only if there is no ORDER BY - joinTkinter subclass for creating a custom widget - pythonAll Articles