Javascript string replace method. Using matches in replacement string
问题 I have the following javascript string /Library/Application%20Support/Adobe/Fireworks%20CS6/Commands The numeral in the "CS#" section may change, but I would like to convert the string to the following format keeping in mind that the numeral may change. /Library/Caches/Adobe/TypeSupport/CS6 I know I can do this in several ways, but for the purpose of education I am looking for the best method. I can search with a regular expression using the replace method, but is it possible to use matches