• Login
Community
  • Login

I need a function that seperates a word from everything other in the line

Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
3 Posts 3 Posters 252 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.
  • M
    Milan Djukanovic
    last edited by Oct 1, 2021, 4:11 PM

    For example, Line1 “gamertag: johnny51 you can add me here”
    After a function I would like to only to see
    Line 1 “johnny51”

    Is this even possible? If it is, I could really use some help. Thanks everybody.

    1 Reply Last reply Reply Quote 0
    • S
      Scott Nielson
      last edited by Oct 1, 2021, 5:32 PM

      If you are searching for the same words every time, just search for, “gamertag: johnny51 you can add me here” and replace it with, “johnny51” in the normal mode. If the words are different, let us know, you will need a Regular Expression for it.

      1 Reply Last reply Reply Quote 0
      • N
        Neil Schipper
        last edited by Oct 2, 2021, 6:24 AM

        @Milan-Djukanovic It’s tough to be sure just what you want to match, and what to exclude. Match a specific name? any string after “gamertag”?

        It would be helpful if you showed several lines, such as:

        gamertag: johnny51 you can add me here
        gamertag: johnny51 you can add me there
        johnny51 you can add me here
        gamertag: johnny52 you can add me here
        zamertag: johnny51 you can add me here
        zamertag: johnny52 you can add me here
        

        and stated clearly which lines should and shouldn’t match, and what the lines should look like after the desired operation. (Also it’s nicer to read text inside a “code” box like I used above; use the 5th edit window button).

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