在计算机中查找notepad,Notepad ++搜索3个字符(Notepad++ Search For 3 Character)

Notepad ++搜索3个字符(Notepad++ Search For 3 Character)

我有一个不同名称的巨大文本文件。 如何搜索仅包含3个字符或长度为3个字符的名称?

I have a huge textfile with different names. How do I search for names that only include 3 characters or are three characters long?

原文:https://stackoverflow.com/questions/29085944

更新时间:2020-10-28 13:10

最满意答案

按Ctrl + F并启用正则表达式搜索。 现在搜索:

[^A-Za-z][A-Za-z][A-Za-z][A-Za-z][^A-Za-z]

它基本上会搜索:

[Non-letter character] 3*[letter character] [Non-letter character]

编辑:正如你所说,你也想搜索数字,所以这是这样的:

[^A-Za-z][A-Za-z][A-Za-z][A-Za-z][^A-Za-z]

Press Ctrl+F and enable Regular expression search. Now search for:

[^A-Za-z][A-Za-z][A-Za-z][A-Za-z][^A-Za-z]

It'll basically search for:

[Non-letter character] 3*[letter character] [Non-letter character]

EDIT: As you said, you wanted to search for numbers too, so this is how:

[^A-Za-z][A-Za-z][A-Za-z][A-Za-z][^A-Za-z]

相关问答

notepad

没关系......我自己用这个RegEx表达式找到它: COMMIT([\s\S]*?)LIB_IpToCountry([\s\S]*?)VALUES

无论如何谢谢塞巴斯蒂安 Nevermind... I found it by myself using this RegEx expression: COMMIT([\s\S]*?)LIB_IpToCountry([\s\S]*?)VALUES

Thanks anyway Sebastian

试试(domain.com/)[^'"]*?(/wp-content) 这将不包括'字符,所以不会有匹配。 Try (domain.com/)[^'"]*?(/wp-content) This will not include ' characters, so there will be no match.

在搜索对话框中设置搜索模式“正则表达式”,然后使用以下正则表达式: Members: [^0]

Set search mode "regular expression" in the search dialog, then use the following regular expression: Members: [^0]

它为我工作:搜索:(id =“[^”] ++)替换:\ 1_1 it worked for me with: search: (id="[^"]++) replace: \1_1

按Ctrl + F并启用正则表达式搜索。 现在搜索: [^A-Za-z][A-Za-z][A-Za-z][A-Za-z][^A-Za-z]

它基本上会搜索: [Non-letter character] 3*[letter character] [Non-letter character]

编辑:正如你所说,你也想搜索数字,所以这是这样的: [^A-Za-z][A-Za-z][A-Za-z][A-Za-z][^A-Za-z]

Press Ctrl+F and enable Regular e

...

在“查找”中打开正则表达式模式,启用“ . matches newline ”: 搜索: ID\.\s.*[\n]+Debt:\s.*$

较旧版本的Notepad ++难以匹配多行正则表达式,请务必使用版本6+ Notepad ++来实现此功能。 Turn on regular expression mode in Find, with ". matches newline" enabled: Search for: ID\.\s.*[\n]+Debt:\s.*$

Older versions

...

这是因为您的MATLAB编辑器设置为使用等宽字体,例如Courier(即所有字符设计为具有完全相同宽度的字体),但您的Notepad ++不是。 在Notepad ++中,您可以使用菜单Settings - > Style Configurator设置字体。 从语言列表中选择“MATLAB”(或者实际上您可能希望选择“全局样式”,为所有语言执行此操作),并将字体设置为等宽字体,如Courier。 或者,您可以下载更现代的编程字体,如Consolas,ProFont,Monofur,Proggy或I

...

对我来说,删除%appdata%\ Notepad ++ \ config.xml(不是整个文件夹)就足够了。 关闭Notepad ++ 打开%appdata%\ Notepad ++文件夹 删除(如果需要备份则重命名)config.xml 启动记事本++ It appears the 'Search Results' window is located outside the screen, the easiest way to get it back is to wipe out notepa

...

这是一个编码问题,要解决它,我建议: 将文件编码为ANSI。 字符\xB7现在显示· 通过替换工具箱进行更换。 找到: \xB7 ,替换: what you want 编码为UTF-8 It is an encoding problem, to solve it, I suggest: Encode the file to ANSI. The character \xB7 is now displayed · Do the replace via Replace toolbox. Find: \x

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值