Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env ruby
- while gets
- while /\b((https?|ftp|file):\/\/|(www|ftp)\.)[\-A-Z0-9+&@#\/%?=~_|\$!,.;:]*[A-Z0-9+&@#\/%=~_|\$]/i
- puts $&
- $_.sub! /\b((https?|ftp|file):\/\/|(www|ftp)\.)[\-A-Z0-9+&@#\/%?=~_|\$!,.;:]*[A-Z0-9+&@#\/%=~_|\$]/i, ''
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement