how to remove prefix from string in javascript code example Example: remove prefix js str.replace(/^myPrefix/,"");