On second thought, your current order has the Ruby flags first, which would be more Ruby friendly.  However, still consider the reason for the order, i.e., common use frequency might be IGNORECASE, MUTLILINE, EXTENDED.