Regex loop yields single element array for multiple finds:

Okay, my string has a parenthesized section, and that is doing it:

markup.scan(/@@@.?(@@@).[email protected]@@/) do |ats|
puts ats.length
puts ats.class
end

is a closer to what I’ve got. My apologies. So, it looks like whenever
you specifiy
a section with parameters you then get an array. I guess that makes
sense. Thanks.

xc

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs