String#scan()!

2009/1/23 doug livesey <[email protected]>

> There must be a simple Ruby way to do this, but I don't know it.I would be
> after something like:
>
> my_regexp.each_match do |matched_substring|
>   # do something with matched_substring
> end
>
> So that a block can be applied against each match -- and if there was
> something that gave you access to re-applied match data in the block, so
> much the better.
> I can do this a few ways, but was wondering if there was a prettier way
> like my imaginary example above -- does anyone know of one?
> Cheers,
>    Doug.
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"NWRUG" 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/nwrug-members?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to