• Login
Community
  • Login

Issue with making this (^.*\\.dxy$)|

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
4 Posts 2 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.
  • J
    Juan Francisco
    last edited by Jan 5, 2022, 6:24 PM

    Hi Everyone,
    Need your help. This is what i am trying to accomplish. I have this data that looks like this .dxy and need it look like (^.\.dxy$)| So my problem is the $)| will not come through i can make the (^.\ come through find with using the Edit>Column Editor. But not the end of it. Even if i use column Editor it does not work because not all the data are 3 characters. Some are 4 some are 3 or 4. I try Search>Replace and it will enter $ but not the closing bracket. Any advice how to overcome this. I am new to this so i am learning.

    P 1 Reply Last reply Jan 5, 2022, 6:57 PM Reply Quote 0
    • P
      PeterJones @Juan Francisco
      last edited by Jan 5, 2022, 6:57 PM

      @juan-francisco ,

      If I understand correctly, you have some things like .dxy in a column, not all the same width, maybe with something coming after it, and you want to convert that to (^.*\\.dxy$)|

      it looks like you are building up regex syntax based on file extensions; assuming then that you know regex, I am surprised you didn’t immediately switch to regex mode in Notepad++'s search-and-replace and accomplish it that way.

      Assuming you have data like:

      .dxx something else
      .1234 more text
      .12 more text
      

      then
      FIND = (\.\S+)(?=\s)
      REPLACE = \(^.*\\\\$1\$\)|
      MODE = regular expression

      (^.*\\.dxx$)| something else
      (^.*\\.1234$)| more text
      (^.*\\.12$)| more text
      
      1 Reply Last reply Reply Quote 1
      • J
        Juan Francisco
        last edited by Juan Francisco Jan 5, 2022, 7:43 PM Jan 5, 2022, 7:40 PM

        yes, I am building up regex syntax. As i noted i am learning it. I am new to it. i am going to test it now. That’s where i was trying to accomplish it but i kept failing miserably on the last part of it $)| I could not make it stick on the end of the line.

        1 Reply Last reply Reply Quote 0
        • J
          Juan Francisco
          last edited by Juan Francisco Jan 5, 2022, 7:56 PM Jan 5, 2022, 7:56 PM

          This is what I have my couple ones from many more. Thank you. Now i know something. Still learning regular expression. And knowing what each means.

          92dfc47b-10df-4feb-908b-8a781b625997-image.png

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