I picked up this grep from somewhere (thank you whoever you are!) to help me find URLs in my magazine:
It works pretty well. I've tried to read through it and understand exactly what it's searching for because it is finding only part of certain URLs
But in this URL:
How can I edit the grep so that it will capture the whole of this URL?
I recommend installing Jongware's "What the GREP" script. It's a great tool for pulling apart GREP strings and telling you exactly what each part of it is doing.
The above script actually breaks for me on your second example, capturing only "http://www.iom.edu". I think it's the space after "National-" that's causing it to break and is probably not actually in your original text. The next "find" after that picks up this:
Is there a pattern to what follows immediately after the URLs? Depending on what the rest of your text looks like, you might be able to get away with truncating the search term to just this: