Hi folks,
I have a regex problem that I think shouldn't be too tough to figure out but I don't know if I've quite got it.
What I want to do is this: Grab a url from a post, check that it's an internal link before allowing the post.
My problem is with the grabbing part. I'm using a preg_match with this definition of a url
/(http:\/\/)+(www.)?+[a-z0-9-]+.[a-z0-9-.]+[a-z]{2,4}/i
but it does not seem to be working.
Can I get some pointers please?