how to remove quotes using regex
str.replace(/^"(.+(?="$))"$/, '$1');
how to remove quotes using regex
str.replace(/^"(.+(?="$))"$/, '$1');
how to remove quotes using regex
if (str.charAt(0) === '"' && str.charAt(str.length -1) === '"')
{
console.log(str.substr(1,str.length -2));
}
how to remove quotes using regex
var someStr = 'He said "Hello, my name is Foo"';
console.log(someStr.replace(/['"]+/g, ''));
how to remove quotes using regex
str.replace(/^["'](.+(?=["']$))["']$/, '$1');
how to remove quotes using regex
var str = 'remove "foo" delimiting double quotes';
console.log(str.replace(/"([^"]+(?="))"/g, '$1'));
//logs remove foo delimiting quotes
str = 'remove only "foo" delimiting "';//note trailing " at the end
console.log(str.replace(/"([^"]+(?="))"/g, '$1'));
//logs remove only foo delimiting "<-- trailing double quote is not removed
how to remove quotes using regex
someStr.replace(/^"(.+)"$/,'$1');
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us