Improved parsing regex