我试图在<month>
标签一个月值替换其各自的月份数,例如:<month>Feb</month>
应该<month>02</month>
与其相应的月份数更换月份名称
我已经尝试过这种被替换,
Dim strFile As String = File.ReadAllText(TextBox1.Text & "\" & parentFolder & ".xml")
strFile = Regex.Replace(strFile, "<conf-start.*?><day>(.*?)</day><month>Feb</month>", "$&<month>02</month>")
File.WriteAllText(TextBox1.Text & "\" & parentFolder & ".xml", strFile)
但它给我下面的输出
<conf-start iso-8601-date="0"><day>00</day><month>Feb</month><month>02</month>
而是其添加标签旁边月份的名字我想我的输出s如下,
<conf-start iso-8601-date="0"><day>00</day><month>02</month>
月份名称应替换为其各自的编号。 在此先感谢..
不要使用正则表达式来处理XML/HTML ... – MarcinJuraszek
难道是你问同样的问题两次吗?请修改一个问题并关闭/删除另一个问题。 – Marijn