I would like to use the Contains
method in a code in C #, but instead of passing a string
literal, that is, a specific word, pass a pattern or a regular expression as a parameter. For example:
Instead of passing:
bool nomeDaVariavel.Contains("#NUSAPRO");
pass something like:
String verifica = @"^#/[A-Z]{1,7}";
//Padrão que captura qualquer String
//que comece com o "#",
//seguido de um a sete caracteres de A a Z em caixa grande
bool nomeDaVariavel.Contains(verifica);
Of course the syntax is wrong, but it's just to get an idea of what I want.
If you can help, I'm grateful.