c# - Regex get error in textbox when having space at the end -


I am using the following regex to verify the numbers which are working properly.
The problem is that if you enter the text box press a few valid numbers and then space , the expression is no longer valid.
How do I ignore the empty space at the end of the value entered by regex handling?

  @ "^ [0-9] + $"    

  @ "^ [0-9] + \s * $"   

In this way, you can take the position of zero or more at the end.

* is a quantifier for this particular purpose

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -