removed s:last_matchend() since matchend() is faster