DEV Community

Anjali Gurjar
Anjali Gurjar

Posted on

" '"" replace in. js

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]

Top comments (0)