I am having an issue which I cannot find documented anywhere, i see a regex method however that is using a direct string rather than string within a variable. This is my cod
You are searching for the pattern that is literally "src." You need to use the RegExp class if you want to use variables in patterns:
RegExp
pattern = new RegExp(src, 'g'); $(".entry-content")...html().replace(pattern, replacement);