This is pretty complex considering that I am just now reading “Learn to
Program” by Chris P. (it is a book teaching you how to program in
Ruby). It is very basic. I am somewhat good with PHP but and wanting
to move into RoR and want to learn Ruby before I learn Rails.
Anyway, I found a real life situation where I think Ruby could do this
very quickly (and if I need to do it again, I can just run the script).
I need to remove some stuff from a text file. Simple huh? Here is
the site that I need the list from:
In that page there is one line of “code” that has all of the
links…here is part of it:
3 Proxy || 3 Proxy || 3 Proxy
I have taken just that line and saved that as a text file.
I will be taking that list (all 300 of them) and adding them to my
content filtering box. That way, all of these sites will be blocked.
Do you guys know of any sites that might have a similar situation where
I can see the code? or have any of you done something similar? I can
probably modify stuff to make it fit my needs, but stuff like
http://www.regular-expressions.info/ruby.html doesn’t give me enough
info to start.
what i have right now is: file = File.open(“list.txt”,“w”)
Sorry I’m a nubee…