Detecting URLs with PCRE - Kore Nordmann

Courtesy Planet PHP  Sat, 06/21/2008 - 12:37

Form time to time I experience the issue that I should detect URLs in some text, while neither the URLs are standard conform (regarding the used characters), nor the URLs are strictly separated from other stuff by whitespaces or something.

Now Derick asked me to provide him with a regular expression for that, and I finally wrote some, which should work in most cases...

Sponsors


 

Related items

PHPFreaks.com: Regular Expressions (Part1) - Basic Syntax
PHPFreaks.com has posted part one of a series of tutorials covering some of the basics of one of the more powerful features in any language -...

Shell bookmarks - Kore Nordmann
Developing in lots of different projects with different directory structures and navigating mostly on the shell sometimes makes it hard to keep track...

Released PHPillow 0.2-alpha - Kore Nordmann
CouchDB 0.8.1-alpha has just been released, and so I am doing a second release of PHPillow. The test suite runs just fine against this version of...

Released PHPillow 0.1-alpha - Kore Nordmann
CouchDB 0.8-alpha has just been released, and so I am doing a first release of PHPillow. The test suite runs just fine against this version of...

Published PHP charset/encoding FAQ - Kore Nordmann
After lots of questions recently on IRC about charsets and encodings, I decided to write up a FAQ about this. The FAQ can now be found in the article...


 

Post new comment

The content of this field is kept private and will not be shown publicly.
computer-internet.marc8.com