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