Next replacement
"index.html".replace('\.html$', '_fr.html');
returns "index.html", which indicates that the first argument matches nothing. However, if I remove the "$"
"index.html".replace('\.html', '_fr.html');
then the first argument matches, and "index_fr.html" is returned.
Returning to the first example, can someone explain why ".html $" does not seem to match "index.html"?
Dónal source
share