From: Keith Raymond some text here ' returns '
and I get a proper closing tag for each
and My
page Testing
\n,
etc... and it's working. This is via scan() method.
==============================
elements = []
opening_tags = file.scan(/<\w+\s+[^>]*>/)
opening_tags.each do |tag|
if tag.match(/class=\\"(.*?)editor(.*?)\\"/) # tries to match anything
with a class="editor"
close = get_closing_tag(tag)
# finds which DOM element it is and returns close tag
# example if '
and
"
==== close ====
"
(.+)<\/p>]/ ==== tag ==== "
" ==== close ==== "
" ==== /#{tag}(.+)#{close}]/ ==== /(.+)<\/p>]/ ==== tag ==== "
" ==== close ==== "
" ==== /#{tag}(.+)#{close}]/ ==== /(.+)<\/p>]/ ======= elements ======== [] +++++++++++++++++++++++++++++++++++++++ Any help would be appreciated. I'm at my wits end here. If there is a completely better way to do this, I'm all ears as well. Thank you in advance. -- Posted via http://www.ruby-forum.com/.