文字列の組み合わせ:
str_search = adfa odf 'aso'
str_search = do o sfo o'sfsdf'
str_search = sdfosd'sf sd'
私がこれまでに行ったこと:
if( /\s*\S*["|']\s*\S*["|']$/.test(str_search) ){
alert('at the 2nd quote');
//replace the string enclosed in quotes with !string!
}//if
最初のブロックの文字列の組み合わせは、2 番目のブロックの条件内に収まる必要があります。したがって、ffは2 番目のブロックで条件に入らないはずです。
str_search = adfa odf 'aso
str_search = do o sfo osfsdf'
str_search = sdfosd'sf sd's