How do I grab specific links in a document using regex?
I have a html file that contains google drive links mixed in with a bunch of html code and other stuff. I am trying to grab the 50 links from the text by finding them all using RegEx to search for keywords they have in common which is drive, google, & sharing
Example:"https://drive.google.com/file/d/1wXbzf0nvddZ0vlz6-fdN7HV/view?usp=sharing"
I want to select the beginning and the end of the links and then be able to copy them all, paste them into another file or erase the other content and just keep those links inside the html document.
I have tried
http\:\/\/www\.[a-zA-Z0-9\.\/\-]+ & `.*?(http\:\/\/www\.[a-zA-Z0-9\.\/\-]+)`
I tried drive which resulted in finding nothing but http & www comes up with results to other links in the file that i am not trying to hit but atleast shows some results instead of me going for specific keywords that i listed.
Im not sure if this is the proper way to go about this and if I should be using another method such as javascript to achieve this etc etc.
I am using Sublime Text on Mac to try and figure this out. I am new to regular expressions.
Following should work:
.
means any character*
The character before can appear multiple times