一連の動的に生成されたラジオ ボタンを持つページにグリッドがあります。すべてのラジオ ボタンには類似した ID 名が付いていますが、ID 名の中央にある増分変数 CTL## (ctl00、ctl01 など) を除きます。
<input id="ctl00_PageBody_grdCustomer_ctl01_rdoCustomerSelect" type="radio" value="rdoCustomerSelect">
<input id="ctl00_PageBody_grdCustomer_ctl02_rdoCustomerSelect" type="radio" value="rdoCustomerSelect">
<input id="ctl00_PageBody_grdCustomer_ctl03_rdoCustomerSelect" type="radio" value="rdoCustomerSelect">
<input id="ctl00_PageBody_grdCustomer_ctl04_rdoCustomerSelect" type="radio" value="rdoCustomerSelect">
<input id="ctl00_PageBody_grdCustomer_ctl05_rdoCustomerSelect" type="radio" value="rdoCustomerSelect">
特定のパターンで開始/終了する場合に ID に一致するコードを見つけましたが、一致するパターンを抽出して属性に割り当てる方法がわかりません。
私の最終目標は、タグを次のようにフォーマットすることです...
<input id="ctl00_PageBody_grdCustomer_ctl01_rdoCustomerSelect" type="radio" value="rdoCustomerSelect" title="rdo_ctl01">
<input id="ctl00_PageBody_grdCustomer_ctl02_rdoCustomerSelect" type="radio" value="rdoCustomerSelect" title="rdo_ctl02">
<input id="ctl00_PageBody_grdCustomer_ctl03_rdoCustomerSelect" type="radio" value="rdoCustomerSelect" title="rdo_ctl03">
等々...
助言がありますか?ありがとう。