fix regexs to deal with hard delimiters