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
v
could in theory appear earlier in the URL than thev
you 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/LICENSE
after
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”.