如何通过C#读取Word指定页面的内容

如题所述

<?php

$url = "xxx";

$content = file_get_contents($url);

$pattern = '#<code[^>]*?id="searchWord"[^>]*?>\s*(\[".*?\])</code>#is';
if(preg_match($pattern, $content, $match)) {
echo $match[1];
} else {
//匹配不到数据(可能是正则没写对)
}
温馨提示:答案为网友推荐,仅供参考
相似回答