I am on a closed network (i.e. no connectivity to the internet).
I have a bourne shell script that asks for the user to enter a regular expression for use with grep -P.
Generally speaking, I like to do some form of input validation.
Is there a way to test a string variable to see if it is a (valid) regex?
(Copying things from the internet onto my system can be done, but it takes forever and is a PITA -- thus I am looking for way to do it natively.)