From: Bob05 Dr Date: 2010-06-30T08:54:21+09:00 Subject: Taking out text between symbols and joining together Hello, I have some text files that I would like to extract text from, then join them on one single line and save them to a text file. Here is an example of the text I want to take out: Protein complexes in Saccharomyces cerevisiae (GPM06600002310) GPM06600002310 None Here is how I would like the text to save as: Protein complexes in Saccharomyces cerevisiae (GPM06600002310)GPM06600002310 None So far I have this: require 'rexml/document' include REXML file = File.new("1.xml") doc = Document.new(file) puts doc aFile = File.new("1.txt", "w") aFile.write(doc) aFile.close I was wondering, how can you split out text and join them on one line? -- Posted via http://www.ruby-forum.com/.