Search in VS Code for occurrences of term greater than N - visual-studio-code

Here's an example:
My search term is myTermABC
I have 100 files in my project
10 files contain myTermABC
Only two of those files contain myTermABC more than once (the other 8 contain it only once)
I only want VS Code to return the two files that contain myTermABC more than once.
How to do this?
Is this even possible?
Maybe there's an extension that enables this functionality?

In vscode search across files you have to specifically tell it to include newlines. The dot doesn't do this in a search in vscode.
So this find should work: (myTermABC[.\n]*){2,}

Related

How can I force VS Code to be consistent for indentation?

I have two docker-compose.yml files in two different projects.
For one, VS Code uses 2 spaces as the indentation space, for the other it uses 4 spaces.
This happens for almost all of file types. .js files and .jsx files and .html files.
We want to make it deterministics for all files regardless of their types and extensions.
We want to force VS Code to indent each new line by 4 spaces, or a simple tab.
Is that possible?
We looked at Edior: Tab Size and it already says 4. So, where does 2 spaces come from?

Visual Studio Code file filter behavior

I've opened a folder in vscode and have a fairly a large file structure to navigate. It would be very helpful if I were able to filter across those files in a way that showed only the file names that containe the filter string while still showing their location in the file hierarchy. I could have sworn that I've done that before but now have lost it.
We do have highlighting in the Explorer pane, by selecting the explorer pane and starting to type. The difficulties there are that it:
Highlights files but doesn't eliminate unmatched files
Doesn't expand folders that contain the matched files
Does a confounding search that is the equivalent of putting a wildcard between each character typed
Do extensions exist that do all of the following?
Filter the file names based on search string (i.e., hides the unmatched files)
Expand the folders that contain the matched file names
Allows for exact search (or regular expression)

Powershell search for pattern with itextsharp.dll

I need to search pdf-files for patterns and then I just want the name of the files containing "region värmland", using that to copy the files to a different folder.
The pattern is in the top right corner, and if possible I would like to search as little as possible in the file due the number of files.
I could not find any relevant information when googleing how to just search for one set of words and keep the output inside the script for further use.
Anyone who can help with this?

Find or replace a string in word documents in a given folder

How to find or replace a word in the documents in the given folder
Is there is a tool or any script is available to do that?
Thanks.
Finding text is straightforward. There are several ways to do it, including using the Windows search utility. Here's an article with several methods: Search through the content of multiple Word documents
To find and replace, you can use a free text editor like Notepad++. It has a very good Find in Files utility. There are many other utilities that can do this, some paid and some free.
Finally, you can write a VBA macro that will find and replace all documents in a folder. Here's a page with a macro listing that does that: How to Find and Replace Contents in Multiple Word Documents

VS Code: Search multiple directories

When searching, VS Code has the ability to list files to include to scope the search. This is used by default when using the "find in folder" feature. For example, searching src results in ./src as the files to include.
Is there a syntax I can use to list multiple directories here? For example, I want to search ./src and ./lib in one search.
Did you try a comma like ./dir1, ./dir2? For me it seems to work
By the way, here is the documentation of 'files to include': https://code.visualstudio.com/Docs/editor/codebasics#_advanced-search-options
In particular, you can use glob notation. Also, VS Code will include/exclude certain directories or files by default, depending on your settings.json, in case anyone still sees unexpected behaviour.