[英]Replace string with the same start and end in notepad++
Not much of a expert in regular expression here. 这里的正则表达专家不多。 My IT colleague dump my a text file which containt all our mailing list.
我的IT同事转储我的文本文件,其中包含我们所有的邮件列表。 But I need to clean it before using it.
但是在使用它之前我需要清理它。
I need to find and delete a string of text which always start by "3EA" and finish by "////". 我需要找到并删除一串始终以“3EA”开头并以“////”结束的文本。
I try several ways, but no cigars. 我尝试了几种方法,但没有雪茄。
Here's some example of the string I need to delete : 这是我需要删除的字符串的一些示例:
3AEAEACjkCjm////
3AEAEACjlCjn////
3AEAEACjnCjp////
Thanks 谢谢
3AE[a-zA-Z]{9}/{4}
Try this.See demo. 试试这个。看看演示。
https://regex101.com/r/vN3sH3/61 https://regex101.com/r/vN3sH3/61
假设在3AE
和////
之间总是有9个字母字符,在搜索和替换中(在正则表达式模式下)将此模式替换为空白模式:
3AE[A-Za-z]{9}////
You could use the below regex, 你可以使用下面的正则表达式,
3EA\S*?////
Add anchors if necessary. 必要时添加锚点。
^3EA\S*?////$
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.