source:
products/PloneSMSCommunicator/trunk/Utils.py
@
3522
Last change on this file since 3522 was 1, checked in by myroslav, 19 years ago | |
---|---|
File size: 229 bytes |
Line | |
---|---|
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.