[email protected] wrote:
> Also does not behave with this code:
> 
> s = "onexytwoxyxythreexyxyxyfour"
> p s.split(/(xy)+/)

Try this:

s = "one<br>two<br><br>three<br><br><br>four"
array = s.split('<br>')
array.compact.reject { |i| i.nil? or i.empty? }

This will produce:

['one', 'two', 'three', 'four' ]


Regards,

Atc.,
Kirk Patrick
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en.

Reply via email to