• Login
Community
  • Login

Remove this type of "prefix"

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
replacestringsprefixfind
4 Posts 2 Posters 2.0k 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.
  • S
    Shyvering Barhard
    last edited by May 16, 2018, 12:40 AM

    I have this:

    0x1100d89 (5): )))>>
    0x1100d90 (21): FFFFFFFFFF))GGDDDDDD4
    0x1100daa (12): 0	@	@	P	`	p	
    0x1100dcf (6): ))))))
    0x1100de8 (5): EEE>>
    0x196051a6 (9): v(handles
    0x196051b8 (39): Ljava/io/ObjectInputStream$HandleTable;
    0x196051e8 (10): passHandle
    0x1100e3d (14): ))))))))))))))
    

    I’m just looking to isolate only the strings, this means I need everything before the " : " should be gone, and also the blank space right after it.

    If you didn’t understand what I mean, I want the stuff from above ^, like this:

    )))>>
    FFFFFFFFFF))GGDDDDDD4
    0	@	@	P	`	p
    ))))))
    EEE>>
    v(handles
    Ljava/io/ObjectInputStream$HandleTable;
    passHandle
     ))))))))))))))
    

    Note: No strings has a " : " so it may easier! for the regex/extended

    Image of my work in N++
    https://i.imgur.com/2hXL2DD.jpg

    Tried that regex but didn’t work.

    S 1 Reply Last reply May 16, 2018, 1:05 AM Reply Quote 0
    • S
      Scott Sumner @Shyvering Barhard
      last edited by May 16, 2018, 1:05 AM

      @Shyvering-Barhard

      Maybe try this one:

      Find what zone: (?-s)^.+:\x20
      Replace with zone: make sure this field is empty
      Search mode: Regular expression

      S 1 Reply Last reply May 16, 2018, 1:16 AM Reply Quote 0
      • S
        Shyvering Barhard @Scott Sumner
        last edited by May 16, 2018, 1:16 AM

        @Scott-Sumner said:

        @Shyvering-Barhard

        Maybe try this one:

        Find what zone: (?-s)^.+:\x20
        Replace with zone: make sure this field is empty
        Search mode: Regular expression

        This worked amazingly well! Could you please explain the use?? Thanks!

        S 1 Reply Last reply May 16, 2018, 11:50 AM Reply Quote 0
        • S
          Scott Sumner @Shyvering Barhard
          last edited by May 16, 2018, 11:50 AM

          @Shyvering-Barhard

          (?-s) -> prevent any following. usage from matching end-of-line characters
          ^ -> only allow match at start-of-line
          .+ -> (from start of line), match one or more characters of any type (except end-of-line)
          : -> match a literal :
          \x20 -> match a space (could have just used a space but it is hard to see on this site, also, in this case could have used \s or \h)

          Check out this posting! : https://notepad-plus-plus.org/community/topic/15765/faq-desk-where-to-find-regex-documentation

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