Guest User

Untitled

a guest
Feb 22nd, 2012
45
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. #!/usr/bin/env ruby
  2.  
  3. url = ('http://www.tvrage.com/NCIS/episodes/720720/')
  4.  
  5.  
  6. if url.match(/(http:\/\/|#{nil})(.+)\/(.+?)\/episodes\/(\d+)(\/?)$/) then
  7.  
  8. puts 'Domain = ' + $2
  9. puts 'Show = ' + $3
  10. puts 'Number = ' + $4
  11. puts "Found"
  12.  
  13. end
Add Comment
Please, Sign In to add comment