• Login
Community
  • Login

RegExp to find path not working (any more)?

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 3 Posters 284 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.
  • C
    Claudia Svenson
    last edited by Jul 21, 2022, 6:00 AM

    A text file contains lots of file names with leading pathes e.g.

    D:\aaa\bbb\ccc\myfile.doc

    I want to search now the next path (except filename) starting at the left in column 1.
    In the past I used therefore a regexp

    (?-s)^,+\

    This should find D:\aaa\bbb\ccc\ from sample above

    But when I enter this RegExp in NP++ Find dialog it does not find any of the hundreds path+filenames.

    Why not?

    Yes, I enabled Regular Expression Search mode at the bottom

    E 1 Reply Last reply Jul 21, 2022, 7:23 AM Reply Quote 0
    • E
      Ekopalypse @Claudia Svenson
      last edited by Jul 21, 2022, 7:23 AM

      @Claudia-Svenson said in RegExp to find path not working (any more)?:

      (?-s)^,+\

      I assume it should be (?-s)^.+\ (note the dot instead of the comma.)

      1 Reply Last reply Reply Quote 0
      • G
        guy038
        last edited by guy038 Jul 21, 2022, 9:42 AM Jul 21, 2022, 9:39 AM

        Hello, @claudia-svenson, @ekopalypse and All,

        Eko, just a typo; the correct regex is :

        SEARCH / MARK (?-s)^.+\\

        BR

        guy038

        C 1 Reply Last reply Jul 22, 2022, 8:06 AM Reply Quote 2
        • C
          Claudia Svenson @guy038
          last edited by Jul 22, 2022, 8:06 AM

          @guy038 said in RegExp to find path not working (any more)?:

          Hello, @claudia-svenson, @ekopalypse and All,
          SEARCH / MARK (?-s)^.+\\

          It works.
          Thank you

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