3
# Breaks a string up into an array based on a regular expression.
4
# Similar to scan, but includes the matches.
6
# s = "<p>This<b>is</b>a test.</p>"
7
# s.divide( /\<.*?\>/ )
8
# #=> ["<p>This", "<b>is", "</b>a test.", "</p>"]
13
re2 = /#{re}.*?(?=#{re}|\Z)/
14
scan(re2) #{re}(?=#{re})/)