source: products/PloneSMSCommunicator/trunk/Utils.py @ 1591

Last change on this file since 1591 was 1, checked in by myroslav, 18 years ago

Building directory structure

File size: 229 bytes
Line 
1import re
2
3def isUrl(url):
4    return re.match(r'(ht|f)tps?://[^\s\r\n]+', url)
5
6def getHostName(server_url):
7    host_name = re.search(r'(?<=://)[a-zA-Z0-9.]+', server_url)
8    host_name = host_name.group(0)
9    return host_name
Note: See TracBrowser for help on using the repository browser.