Could someone tell me why my off-topic flag was declined on this question?
Bash script programming: how to match pattern in string?
At best it's a generic programming / scripting question that - in my opinion - has nothing to do with Ubuntu and is unlikely to help any future visitors. Also, someone was declined from removing the perl tag, when it's unclear to me how or why this question is related to perl.