How does surl recognize links?
- Keywords:
- Last updated by:
- Savvas Radevic
I have integrated a simple way of recognizing and capturing full URL links, using regular expressions (regex):
def urlRegexString(
""" Returns the regular expressions string used for catching URLs """
urlregex = {
'byip' : '\d{1,3}
'rest2' : '(?:/\S*
}
'(?:' + \
')' + \
return urlregex_string
*** NOTE ***
You should be aware of one thing: it doesn't detect whitespace characters (space, enter/new line, etc.). For example, if the link is "http://
There is nothing I can do about that right now - the proper link should be "http://