I need to validate the input of values and strings, however I have questions about how to use without using the Regex class, how can I get the solution?
var CampoExpressao = new Regex(@"[0-9]");
Above is a regular expression example code.
I need to validate the input of values and strings, however I have questions about how to use without using the Regex class, how can I get the solution?
var CampoExpressao = new Regex(@"[0-9]");
Above is a regular expression example code.
Good evening, my friend. I think you are confusing with Javascript. In Javascript it is possible to create a regular expression only the closed pattern between bars
var re = /ab+c/;
or with the RegExp class
var re = new RegExp("ab+c");
Source: link
In C # you will always use the Regex class.
For more information, see the official Microsoft .NET Regular Expressions Guide, which you can find here