Is it possible to detect a valid regular expression with another regular expression? If so please give example code below.
Unlikely.
Evaluate it in a try..catch or whatever your language provides.
try..catch