Find regex file name



  • How do I search for a file name like ES-00106.pdf using regex?



  • @David-Ardaiz

    1. If you want to search for something following a pattern and you ask others to help you creating this pattern, you should provide rules that describe the pattern you need. Solely throwing in a file name is not sufficient. You should at least give examples for file names which should be matched by the regular expression.

    2. Notepad++ is not a shell to search for files, it is at most a search engine to search files for specific content. Fortunately it also accepts the usage of file name masks to focus its search to specific files, but these file name masks can not be regular expressions. The only meta charactes you can use in file name masks are * (any number of any characters) and ? (any character exactly once).

    So, if you solely want to search files whose names follow a specific pattern you should use another tool. Maybe a command prompt and using the dir command (maybe extended with the findstr command or with a Windows port of the UNIX grep tool) is suitable for you. You can also use a GUI based search tool like >> grepWin << that provides usage of regular expressions in file name masks.

    Also note: This is a community forum for Notepad++ and not a regular expression help forum. But maybe you will be lucky to get help from a forum member if you at least provide the info described under 1.



  • I need to search for file names in html code.

    Text to search D: \ Fitos \ excel \ ([1-9] [0-9] *) (. Xlsx “target =” _ top "> Old pdf)
    Replace with D: \ Fitos \ excel2 \ $ 2 (.xlsx “target =” _ top "> Old Pdf) with this regex search I find Excel files like 13037.xlsx


Log in to reply