Fix fragment markers and their regexes