source:
products/PloneSMSCommunicator/trunk/Utils.py
@
1
| Last change on this file since 1 was 1, checked in by myroslav, 20 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.
![(please configure the [header_logo] section in trac.ini)](/trac/chrome/common/qtrac_logo.png)