尝试从比较中删除多余的行

发布于 2025-01-19 22:29:47 字数 541 浏览 1 评论 0原文

这是我比较中的几行,

                           Cycle Date - 03/22/2022
                           Cycle Date - 03/23/2022


Policy Number : 9999999999                              Produced on 03/23/2022
Policy Number : 9999999999                              Produced on 03/22/2022

当我单击“差异”时,我不希望显示这些行。

我在“规则”、“不重要的数据”中尝试了这些

^\s*Cycle Date - \d{2}+/\d{2}+/\d{4}
^*\sProduced on \d{2}/\d{2}/\d{4}

行。获得正确的组合或是否可以完成并不容易。不确定是否需要将其添加到语法部分

注意 - 我在对比较很重要的语法元素上选中了“其他所有内容”框

Here are a couple of lines on my compare

                           Cycle Date - 03/22/2022
                           Cycle Date - 03/23/2022


Policy Number : 9999999999                              Produced on 03/23/2022
Policy Number : 9999999999                              Produced on 03/22/2022

I do not want these lines to show when I click on Diffs

I tried these in Rules, Unimportant Data

^\s*Cycle Date - \d{2}+/\d{2}+/\d{4}
^*\sProduced on \d{2}/\d{2}/\d{4}

It's not easy to get the right combinations or whether it can be done. Not sure if it needs to be added in the Grammar section

NOTE - I have Everything Else box checked on Grammar Elements that are important to the comparison

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

美胚控场 2025-01-26 22:29:47

正则表达式有两个问题。

^\s*Cycle Date - \d{2}+/\d{2}+/\d{4}

使用\ d {2}您捕获了两位数字,因此无需+

尝试:

^\s*Cycle Date - \d{2}/\d{2}/\d{4}

in(我猜*\ s应该是一个``\ s*),

^\s*Produced on \d{2}/\d{2}/\d{4}

您可以选择一条线(^ =线的开始),然后使用前面空间,然后由... 生成的。但是该行以策略开始。

如果删除^

\sProduced on \d{2}/\d{2}/\d{4}

则获得所需的内容:

“比较”

“

You have two problems with the regular expressions.

^\s*Cycle Date - \d{2}+/\d{2}+/\d{4}

With \d{2} you catch two digits, so there is no need of a +

Try:

^\s*Cycle Date - \d{2}/\d{2}/\d{4}

In (I guess the *\s should be a `\s*)

^\s*Produced on \d{2}/\d{2}/\d{4}

you select for a line (^ = start of line) with leading spaces, then the Produced by.... But the line starts with Policy.

If you remove the ^,

\sProduced on \d{2}/\d{2}/\d{4}

then you get what you want:

Comparison

Importance rules

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文