replace str_replace in parseName

only replace the match at the beginning of the string