Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I tried the regular expression offered by <code>Smandoli</code>, but it actually crashed <code>Sublime Text 2</code>! </p> <p>Maybe its a problem with one of the <code>Sublime</code> plugins I've added, I simply don't know. </p> <p>The reason I wanted to use <code>Sublime</code> to do the search is that I'm working on a reasonably large project with well over a thousand files. So I want to search the project for files containing a particular string ('Mickey'). Edit the file if necessary and add the word Mouse. Then I could 'refresh' the search which would now omit the file I just edited because it no longer fits the search criteria. Its a reasonable work flow. </p> <pre><code> Note: The strings are not actually Mickey and Mouse, I just used those to illustrate the problem. I don't work for Disney :) </code></pre> <p>Because the <code>regex</code> offered by <code>Smandoli</code> crashed <code>Sublime</code> I also tried the <code>grep</code> command offered by <code>Tom Lord</code> (I'm running on <code>Windows 7</code>) but couldn't see a way to only target files with a particular extension (<code>*.asp</code>)</p> <p>In the end I wrote a small <code>Powershell</code> script that seems to do the trick:</p> <pre><code>Get-ChildItem -recurse | Where-Object {$_.FullName -like "*.asp"} ForEach-Object { if( ( $(Get-Content $_) | select-string -pattern "Mickey") ) { $_.PsPath }} | Get-ChildItem | ForEach-Object { if( !( $(Get-Content $_) | select-string -pattern "Mouse") ) { $_.PsPath }} </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload