Make the RE to find macros more robust