拨开荷叶行,寻梦已然成。仙女莲花里,翩翩白鹭情。
IMG-LOGO
主页 文章列表 使用windowsfindstr和正则表达式提取子字符串

使用windowsfindstr和正则表达式提取子字符串

白鹭 - 2022-03-07 1975 0 0

我已经搜索了已经提出的问题,尽管我找到了一些有趣的答案,但我无法将这些答案应用于我的具体案例如果你觉得我太愚蠢了,我深表歉意:(

情况如下:

我有一个 html 档案,其中包含几行如下所示:

<h3 class ="title-3"><a href="/product/PD00334951.html">Title name nb 1</a></h3>
<h3 class ="title-3"><a href="/product/PD00397772.html">Title name nb 2</a></h3>
<h3 class ="title-3"><a href="/product/PD00324955.html">Title name nb 3</a></h3>
...

使用 Windows 命令列工具 findstr (并且只有那个工具),我正在尝试检查是否可以仅提取 /product/PDxxxxxxxx.html 子字符串

有什么猜测吗?首先十分感谢

uj5u.com热心网友回复:

我终于切换到 PowerShell 这样字符串操作会更容易 不再需要回答

标签:

0 评论

发表评论

您的电子邮件地址不会被公开。 必填的字段已做标记 *