Switched to using bash regexp expressions in some tests