Rather than roll my own URL regexes, I prefer to let the existing libraries do the heavy lifting. Ruby has a uri library which is fantastic for parsing (and validating) URLs. For example, something like this might be used in a model validation: I noticed a bit ago that I started getting invalid URL errors [...]
-
About
I'm Chris Heald. I'm a software developer and serial tinkerer from Phoenix, Arizona. I work as Chief Architect for Mashable, where I get to build nifty things. I work primarily in Ruby, Javascript, and PHP, and am always on the lookout for new and interesting things to tinker with. Connect with me on Google+ or Twitter.
Follow @cheald -
Pages
-
Categories
-
Archives
-
Meta