Use bash pattern matching rather than sed extended regular expressions due to BSD vs. GNU flag differences
Update to use ugly awk instead of bash regular expressions because of needing a non-greedy matching that's cross platform
Redo the matching to use ugly awk rather than bash pattern matching because of greedy matches