handle markdown using regex.