我如何搜索< ITEM1和GT;和<&ITEM2 GT;使用德尔福XE2 IDE搜索? [英] How can I search for <item1> AND <item2> using the Delphi XE2 IDE search?

查看:199
本文介绍了我如何搜索< ITEM1和GT;和<&ITEM2 GT;使用德尔福XE2 IDE搜索?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用所有的搜索我的(巨)应用程序源代码中查找的东西,所以搜索效果的时间对我来说非常重要。 psently $ P $在Delphi XE2 IDE我喜欢用:

I use searching all the time to locate stuff within my (huge) application source, so search effectiveness is very important to me. Presently in the Delphi XE2 IDE I like to use:


  • 找到在文件

  • 包含子目录。

没有别的花哨,只是一个文本关键字。这工作好,但我真的很想做的是延长我现在正在做的事情,包括含有A和B其中A和B是任意字符组(一个布尔类型搜索)线。对A和B的精确匹配都很好,因为这个现在允许你把两个非常局部的关键词,并从中找到了独特的occurence。我已经使用了多年,我自己的搜索引擎这种方法。有没有在Delphi IDE请这样做的一个简单的方法?
谢谢

Nothing else fancy, just a text keyword. This works ok but what I would really like to do is to extend what I'm doing now to include lines that contain 'A' AND 'B' where A and B are any group of characters (one type of boolean search). Exact matches against A and B are fine, because this now allows you to put in two very partial keywords and still find a unique occurence. I've been using this method in my own search engine for years. Is there an easy way of doing this in the Delphi IDE please? Thanks

推荐答案

您可以使用普通的前pressions(只检查常规EX pressions 复选框在右侧查找窗口)。正则表达式的支持是比较有限 - 它的记录为XE2在 XE2 docwiki这里

You can use regular expressions (just check the regular expressions checkbox on the right side of the Find window). The regex support is somewhat limited - it's documented for XE2 on the XE2 docwiki here.

我用 GExperts grep的搜索而不是 GExperts IDE专家设置),它提供了更全面的正则表达式的支持(虽然仍然不是很大)和更好的显示效果(IMO)的搜索结果。 (注意grep的搜索对话框的图像包含一个普通的前pression将匹配 WordA或WordB 中的文件以任何顺序,所以它满足在你的搜索逻辑在GExperts有限的正则表达式的支持。它单个词就行匹配为好,但结果对话框可以很容易地找到你感兴趣的线路,并双击线路将带你到那场比赛在IDE的$ C $ç编辑。)

I use GExperts Grep Search instead (part of the GExperts IDE experts set), which offers fuller regex support (although still not great) and a better display (IMO) of the search results. (Note the image of the Grep Search dialog contains a regular expression that will match WordA or WordB in either order in the file, so it satisfies your search logic within the limited regex support in GExperts. It matches single words on the line as well, but the results dialog makes it easy to find the lines you're interested in, and double-clicking a line will take you to that match in the IDE's code editor.)

以上是基于一个单一的文件搜索和这些结果。为多个文件(在这种情况下,只有两个),出现的对话框是这样的:

The above results are based on a single file search and those results. For multiple files (in this case, just two), the dialog appears like this:

这篇关于我如何搜索< ITEM1和GT;和<&ITEM2 GT;使用德尔福XE2 IDE搜索?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆