リンクされていないチャプターを見つけるc#で正規表現のヘルプが必要です
この以下の例では、第7章はリンクされていますが、第6章と第II章はリンクされていません。リンクされていない人を見つけたいと思います(コードにリストされている他のいくつかのケース)。
xmlの例:
...
<p class="text_noindent"><a id="page_47"/>Much of this will
be explained further in the <a xref="ch007">chapter 7</a>context of the charity fashion
show described in Chapter 6. Chapters II</p>
...
これを見つけるための私のコードは
Regex.Matches(chk.Replace("(", "").Replace(")", ""), "[^<>/\"]\\s*(figure|table|fig.|tab.|chapters|chapter|chap.|cap.|part|figures|tables|chapters|figs.|tabs.)\\s[0-9]+[^a-zA-Z0-9]", RegexOptions.IgnoreCase);
Regex.Matches(chk.Replace("(", "").Replace(")", ""), "[^<>/\"]\\s*(figure|table|fig.|tab.|chapters|chapter|chap.|cap.|part|figures|tables|chapters|figs.|tabs.)\\s(XC|XL|L?X{0,3})(IX|IV|V?I{0,3})[^a-zA-Z0-9]", RegexOptions.IgnoreCase);
しかし、スケープ1、スタブステーブル...などの選択オプションは、誰もが私に最良の解決策を提案することもできます