This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Valid phone number patterns: | |
| 01611234567 | |
| 0161 123 4567 | |
| (0161) 123 4567 | |
| 0161-123-4567 | |
| +44 161 123 4567 | |
| +441611234567 | |
| +44(0)161234567 | |
| 00 44 161 1234567 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| function getHostFromUrlString(url){ | |
| var url = "www.a.host.com/sub/super.html?id=123"; | |
| var tempA = document.createElement('a'); | |
| tempA.href = url; | |
| return tempA.hostname; | |
| } |