" '"" replace in. js

Anjali Gurjar - Feb 10 - - Dev Community

function trimquest(str){
return str.replace(/^([' "])(.*)\1$,'$2')

function sec(str){
const seg=str.split('.' );
if(seg.length<2){
return ''}
return seg[seg.length-2]

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .