JAVASCRIPT

    작은 따옴표를 두 개의 작은 따옴표로 바꾸는 정규식
    • 조회수 616
    • 작성일 2019-02-21
    •  



    str.split("'").join("''")




    function QuoteEncoding(strvalue) {

        var strquotes = /(')/g;

        return "'" + strvalue.replace(strquotes, "''") + "'";

    }


    QuoteEncoding(strvalue);