In my app I run some scripts, I have something like:
void RunScript(string path)
I get exeption when there is spaces or spacial chars in the path so I want to validate the path beforehend, I need something like:
bool ValidPath(string path){
return !path.Contans(" ") | !path.Contans(spacial chars);
}
Can you help me with some regex or something else to validate this?