Improved regex operation. @amitaibu thanks.