Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

surround substring with quotes

str = "toQuotenotToQuote"

quotedStr = str.replace(/(toQuote)/g, '"$1"')

console.log(quotedStr) // "toQuote"notToQuote
 
PREVIOUS NEXT
Tagged: #surround #substring #quotes
ADD COMMENT
Topic
Name
3+8 =