Find files with regular expressions in Windows

Use regular expressions (regex) to find files that match a character pattern. Learn the operators and follow the WinFindr search steps.

WinFindr supports regular expression search alongside plain search words and file masks (wildcards). Use regex when you need a more specific pattern than a word or a file extension.

Download WinFindr free

What are regular expressions?

Regex search is a type of search where you can use regular expressions to search for files. Regular expressions are a way to describe a pattern of characters. If you have very specific file searching requirements, regex search can be a powerful option for you.

Regular expression syntax and examples

WinFindr supports Perl-compatible regular expressions. Here is a quick overview of common regex operators:

Pattern Meaning Example Match
abc Matches exact "abc" abc
a.c . matches any single character a-c, abc, a9c
^abc Starts with "abc" abcdef
abc$ Ends with "abc" 123abc
[abc] Matches any of a, b, or c a, b, c
[^abc] Any char except a, b, c d, x, 1
[a-z] Any lowercase letter q, m
[0-9] Any digit 5
\d Digit (same as [0-9]) 7
\w Word character (letters, digits, _) A, z, 8, _
\s Whitespace space, tab
a+ One or more occurrences of a a, aa, aaaa
a* Zero or more occurrences of a , a, aaa
a? Zero or one a , a
a{3} Exactly 3 occurrences of a aaa
a{2,4} 2 to 4 occurrences of a aa, aaa, aaaa
(ab)+ Group "ab" one or more times ab, abab
ab|cd Matches "ab" or "cd" ab, cd

How to find files with regular expressions

To use regex search in WinFindr, follow these steps:

  1. Open WinFindr. Download it now if you haven’t already.
  2. Enter one or more regular expression search terms, one per line. For example, “^[A-Z]$”.
  3. Control-Click on the “Files” checkbox to only search for files. (Optional step)
  4. Click on the “Start” button to start the search.
  5. WinFindr will now search for all files using the regex search terms you entered.

This is how the regex search looks:

WinFindr Screenshot - Find files by regex in Windows

Choose the search mode for your task

For a filename extension or a simple pattern, you can use file masks such as *.pdf. To search by a broader category, follow the file type search tutorial. If you only remember an approximate word or spelling, try natural language search.

Download WinFindr

You need to download WinFindr – it finds your files so fast, even my dad jokes can’t keep up!

Start Download