• Login
Community
  • Login

Find regex file name

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 2 Posters 815 Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    David Ardaiz
    last edited by Jun 21, 2021, 9:07 AM

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

    D 1 Reply Last reply Jun 21, 2021, 9:50 AM Reply Quote 0
    • D
      dinkumoil @David Ardaiz
      last edited by Jun 21, 2021, 9:50 AM

      @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.

      1 Reply Last reply Reply Quote 1
      • D
        David Ardaiz
        last edited by Jun 21, 2021, 10:13 AM

        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

        1 Reply Last reply Reply Quote 0
        3 out of 3
        • First post
          3/3
          Last post
        The Community of users of the Notepad++ text editor.
        Powered by NodeBB | Contributors