Community
    • Login

    Removing all texts prior to a character in a string

    Scheduled Pinned Locked Moved Help wanted · · · – – – · · ·
    5 Posts 3 Posters 3.8k Views 2 Watching
    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.
    • jeffvb9J Offline
      jeffvb9
      last edited by

      Example:
      https://github.com/prometheus/procfs/blob/v0.6.0/LICENSE
      https://github.com/ryanuber/go-glob/blob/v1.0.0/LICENSE
      https://github.com/spf13/cast/blob/v1.5.0/LICENSE
      https://github.com/spf13/pflag/blob/v1.0.5/LICENSE
      https://github.com/stretchr/objx/blob/v0.4.0/LICENSE

      Remove everything up to the v in each line and also remove the v.

      I have been researching this all morning and cant figure it out.

      Alan KilbornA 1 Reply Last reply Reply Quote 0
      • Alan KilbornA Offline
        Alan Kilborn @jeffvb9
        last edited by

        @jeffvb9

        You need to be very careful with this, because v could in theory appear earlier in the URL than the v you are (I believe) referring to.

        Find: (?-is)^.*?/v
        Search mode: Regular expression

        Learn more about regular expressions by following the advice HERE.

        jeffvb9J 1 Reply Last reply Reply Quote 2
        • jeffvb9J Offline
          jeffvb9 @Alan Kilborn
          last edited by

          @Alan-Kilborn said in Removing all texts prior to a character in a string:

          @jeffvb9

          You need to be very careful with this, because v could in theory appear earlier in the URL than the v you are (I believe) referring to.

          Find: (?-is)^.*?/v
          Search mode: Regular expression

          Learn more about regular expressions by following the advice HERE.

          This doesnt seem to be working. Also we could look for /v and remove everything before and /v if possible.

          PeterJonesP Alan KilbornA 2 Replies Last reply Reply Quote 0
          • PeterJonesP Offline
            PeterJones @jeffvb9
            last edited by PeterJones

            @jeffvb9 said in Removing all texts prior to a character in a string:

            This doesnt seem to be working.

            How can this in any way be considered “not working” according to your description of your desired results?

            Remove everything up to the v in each line and also remove the v.

            before

            https://github.com/prometheus/procfs/blob/v0.6.0/LICENSE
            https://github.com/ryanuber/go-glob/blob/v1.0.0/LICENSE
            https://github.com/spf13/cast/blob/v1.5.0/LICENSE
            https://github.com/spf13/pflag/blob/v1.0.5/LICENSE
            https://github.com/stretchr/objx/blob/v0.4.0/LICENSE
            

            after

            0.6.0/LICENSE
            1.0.0/LICENSE
            1.5.0/LICENSE
            1.0.5/LICENSE
            0.4.0/LICENSE
            

            1a55c62b-20f8-459c-beac-4dd2494383cb-image.png

            Please note, if you had used the Search/Replace Template, there would have been no ambiguity in your desires.

            1 Reply Last reply Reply Quote 3
            • Alan KilbornA Offline
              Alan Kilborn @jeffvb9
              last edited by

              @jeffvb9 said in Removing all texts prior to a character in a string:

              This doesnt seem to be working.
              Also we could look for /v and remove everything before and /v if possible.

              That’s really just a restatement of the same problem statement from before, which you claim “isn’t working”.

              1 Reply Last reply Reply Quote 1

              Hello! It looks like you're interested in this conversation, but you don't have an account yet.

              Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

              With your input, this post could be even better 💗

              Register Login
              • First post
                Last post
              The Community of users of the Notepad++ text editor.
              Powered by NodeBB | Contributors