HTMLコンテンツに関連するパターンを見つけて置き換えるC#正規表現を作成しています。私はそのようなすべてのものを取得する必要があります:
<table border=0 align=center id=mytable5>
そのように修正:
<table border="0" align="center" id="mytable5">
私はこれを試しました:
String pattern = @"\s(?<element>[a-z])=(?<valeur>\d+?[a-z])\s?[\>]";
String replacePattern = "${element}=[\"]${valeur}[\"]";
html = Regex.Replace(html, pattern, replacePattern, RegexOptions.IgnoreCase);
しかし絶対に効果はありません。どんな助けでも大歓迎です。皆さん、ありがとうございました
実際にはキングキング、正規表現に問題があります
<table border=0 align="center" id="mytable5">
あげる
<table border="0" align=""center"" id=""mytable5"">
そのため、正規表現はこれをチェックする必要があります
[a スペース][az]=[a-z0-9][a スペースまたは '>']