私のページには、次のように記述された入力ボタンがあります。
<input type="button" value="" idtag="" style="color:rgb(51, 156, 203); background-color:white; border:0px; padding:0px;">
正規表現を使用してvalueとidtagの値を取得できますか?そして、メソッドreplaceの後、文字列の結果を置き換えるには?
text = text.replace(/(<input type="button" value="(.+)" idtag="(.+)" style="color:rgb(51, 156, 203); background-color:white; border:0px; padding:0px;"> )/gi, function($0,$1,$2){return $3+"-"+$4;});
ありがとうございました