I'm doing a C # application on Windows Form using .Net Framework 3.5 . In this application I have a textbox for the entry of CPF or CNPJ.
I need this field to have only numbers and CPF / CNPJ characters (./-). I would like to validate this field in the KeyPress event using Regex . Is it possible?