Use bash pattern matching rather than sed extended regular expressions due to BSD vs. GNU flag differences