NYCPHP Meetup

NYPHP.org

[nycphp-talk] regexp for URLs (is this correct?)

Adam Maccabee Trachtenberg adam at trachtenberg.com
Mon May 3 15:25:00 EDT 2004


On Mon, 3 May 2004, Jayesh Sheth wrote:

> Any suggestions or corrections?

I trust Jeff Friedl's regex. He wrote "Mastering Regular Expressions"
for O'Reilly and works at Yahoo!

http://www.regex.info/listing.cgi?ps=208

Also, FWIW, it's often faster and easier to write two regular
expressions to check a string than trying to cram everything into one
hugegantic regex.

You end up spending more time working on the regex than you ever save
during the course of the total run time of the program. OTOH, it's
fun. :)

-adam

-- 
adam at trachtenberg.com
author of o'reilly's php cookbook
avoid the holiday rush, buy your copy today!



More information about the talk mailing list