Javascriptã®æ£è¦è¡¨ç¾ç½®æï¼replaceã¡ã½ããï¼ã§å¾æ¹åç §ï¼RegExp.$1ã¨ãï¼ã使ãããã¨æã£ãæã str = "aaaaaa123aaaaa456aaaa7890" str1 = str.replace(/(\d+)/g, " (" + RegExp.$1 + ") "); //=> aaaaaa () aaaaa () aaaa () ãªãã¦æ¸ãã¦ããã¾ãããã¾ããããªããªããRegExp.$1ã¯ååã®æ¤ç´¢æã«æå¾ã«ãããããå¾æ¹åç §ã§ããããå®éã«è©¦ãã¦ã¿ãã¨ãããã¾ãã str = "aaaaaa123aaaaa456aaaa7890" str1 = str.replace(/(\d+)/g, " (" + RegExp.$1 + ") "); str2 = str.replace(/(\d+)/g, " (" + RegExp.$1 + ") "); //=>
{{#tags}}- {{label}}
{{/tags}}