Hey all

so, I primarily use PERL for creating shell scripts but I'm trying to
learn ruby since it feels like it could do more of what I want with
cleaner code. I especially like the way it has regex built right in.

I'm running into an issue though, because in perl, I can do this:

while (/href=\"([^\"]+)\"/) {
## do stuff...
}

I use this simple regex because it's based around what I use this style
for the most.

I can't figure out how to that in ruby. how can I iterate over all
matches in a string? I could split the lines, but sometimes there may be
two or more matches on a single line.

is there a nice, clean, ruby way to do this?

Thanks!
-- 
Posted via http://www.ruby-forum.com/.