source:
products/PloneSMSCommunicator/trunk/Utils.py
@
12
Last change on this file since 12 was 1, checked in by myroslav, 18 years ago | |
---|---|
File size: 229 bytes |
Rev | Line | |
---|---|---|
[1] | 1 | import re |
2 | ||
3 | def isUrl(url): | |
4 | return re.match(r'(ht|f)tps?://[^\s\r\n]+', url) | |
5 | ||
6 | def 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.