Frederick Cheung wrote:
> On 15 Oct 2008, at 15:44, Joe Peck wrote:
> 
>> .match(/^((http|https):\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.(\w+).* 
>> $/ix)
>>
>> How can I make it not accept URLs with / in the middle of them?
> 
> for the record, the problem here is .* at the end
> ^((http|https):\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.(\w+)
> matches against
> http://www.ruby
> and the remainder (/rails.com) trivially matches against .*
> 
> Fred

Thanks, I don't know how I missed that.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to