正则表达式 - 如何检测文本块中是否只有URL

I'm trying to find a way to detect if a block of text only has URLs in it. Another way to say it would be to see if a block of text doesn't have any text besides what is in a URL.

We're getting a lot of spam but one tell tale of a spammer is they often only post links and no other text. So they'll post

http://link1.xyz http://link2.syx

and nothing else. Looking for a regex expression that could detect this. Using php as well.

I have used this RegEx with big success:

\b(https?|ftp|file):\/\/[-\w+&@#\/%?=~_|!:,.;]*[-\w+&@#\/%=~_|]

Now all you have to do is check whether the match is equal to the Whole string.