go - Rewrite regex without negation -
i have wrote regex me extract links text files:
https?:\/\/(?:.(?!https?:\/\/))+$
because using golang/regexp lib, i'm not able use it, due negation (?!..
what it, select text last occurance of http/https till end.
sometextsometexhttp://websites.com/path/subpath/#query1sometexthttp://websites.com/path/subpath/#query2
=> output: http://websites.com/path/subpath/#query2
can me solution, i've spent several hours trying different ways of reproducing same result no success.
Comments
Post a Comment