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.

try regex:

https?:[^:]*$ 

regex live here.


Comments

Popular posts from this blog

python - pip install -U PySide error -

arrays - C++ error: a brace-enclosed initializer is not allowed here before ‘{’ token -

cytoscape.js - How to add nodes to Dagre layout with Cytoscape -