I have this regex:
'#(([a-zA-Z0-9-]+)\.)*([a-zA-Z0-9-]+)\.([a-zA-Z0-9-]+)#'
which is good, except that it doesn't get links with a directory behind like:
domain.com/directory
How to solve this?
Regex for links
Moderator: General Moderators
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
- DigitalMind
- Forum Contributor
- Posts: 152
- Joined: Mon Sep 27, 2010 2:27 am
- Location: Ukraine, Kharkov
Re: Regex for links
try '#(([a-zA-Z0-9-]+)\.)*([a-zA-Z0-9-]+)\.([a-zA-Z0-9-]+)(/[a-zA-Z0-9-]+)*#'
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: Regex for links
Thanx