a. âã§ãã txt.replace( /hoge(.*)huga/, "huga$1hoge"); b. Ãã§ããªã txt.replace( /hoge(.*)huga/, "huga" + $1 + "hoge"); c. Ãã§ããªã txt.replace( /hoge(.*)huga/, "huga" + RegExp.$1 + "hoge"); â»ãã£ããmatchããããã¨ã§ãªãã¨ä½¿ããªãããã bãã§ããªãçç±ãããããªãâ¦_|ï¿£|Oï¼ãããªã«é£ãããã¨ãï¼ï¼ ã§ã代ããã«ããããã d. âã§ãã txt.replace( /hoge(.*)huga/, function (whole,s1) { return( "huga" + s1 + "hoge"); } ); ãªãã¼ãã ããããã®ãé¢æ°ã®å¼æ°æ±ºããã¡ã£ã¦ã®ããã©ã¤ãªã®ã ãâ¦ã¾ããPerlã§ãsortã¨ãããã ã
{{#tags}}- {{label}}
{{/tags}}