Updated with improved regex.