C
Christopher Benson-Manica
Why doesn't this replace all double quotes in a string with the letter
Q?
source.replace( /"([^"]*)"/g, "Q$1Q" );
Q?
source.replace( /"([^"]*)"/g, "Q$1Q" );
Why doesn't this replace all double quotes in a string with the letter Q?
source.replace( /"([^"]*)"/g, "Q$1Q" );
Michael Winter said:It does for me. Are you forgetting to reassign the result to 'source'?
Why doesn't this replace all double quotes in a string with the
letter Q?
source.replace( /"([^"]*)"/g, "Q$1Q" );
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.