[TO_STAGE] fix bash regexp in upgrade scripts