Currently working on some RegExp to parse an input file for correct content. I'm using the below RegExp to parse some input:
Input it should match:
Or match this:
-sit part of the input should be an optional capture group, which to my understanding means the RegExp will continue successfully if it does not find this capture group, or also finish successfully if it does find it.
For this instance, I would be using it in an if statement:
if [[ "$Input" =~ $RegExp ]]; then #stuff fi
Can anyone point out what is wrong with the above? I have been using
regex101.com to test it.