Removing all texts prior to a character in a string
-
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/LICENSERemove 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-Kilborn said in Removing all texts prior to a character in a string:
You need to be very careful with this, because
vcould in theory appear earlier in the URL than thevyou are (I believe) referring to.Find:
(?-is)^.*?/v
Search mode: Regular expressionLearn 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.
-
@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/LICENSEafter
0.6.0/LICENSE 1.0.0/LICENSE 1.5.0/LICENSE 1.0.5/LICENSE 0.4.0/LICENSE
Please note, if you had used the Search/Replace Template, there would have been no ambiguity in your desires.
-
@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”.
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