尝试从比较中删除多余的行
这是我比较中的几行,
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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
正则表达式有两个问题。
使用
\ d {2}
您捕获了两位数字,因此无需+
尝试:
in(我猜
*\ s
应该是一个``\ s*),您可以选择一条线(
^
=线的开始),然后使用前面空间,然后由... 生成的。但是该行以
策略
开始。如果删除
^
,则获得所需的内容:
You have two problems with the regular expressions.
With
\d{2}
you catch two digits, so there is no need of a+
Try:
In (I guess the
*\s
should be a `\s*)you select for a line (
^
= start of line) with leading spaces, then theProduced by...
. But the line starts withPolicy
.If you remove the
^
,then you get what you want: