Forum: Ruby on Rails Best method for extracting text from a longer text in Ruby

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Matthew Nova (Guest)
on 2006-04-02 05:07
Hi Guys,

I need to extract a text string from a longer text string. Both strings
are variable in length and the text to extract is always between
recognizable characters or tags (or the text to extract is from a known
distance from said tags).

I'm not an expert at text manipulation in ruby so it would be great if
someone could recommend the best solution. I'm looking at the docs right
now and I'm dying to know what's the best method and/or if there is
another one to avoid before I start coding ;-).

Thanks,
--Matt
Rob B. (Guest)
on 2006-04-02 09:18
(Received via mailing list)
Look at String#split or some of the Regexp methods.  You'll probably
find something that will work for you.

-Rob


Rob B.		http://agileconsultingllc.com
removed_email_address@domain.invalid
+1 513-295-4739
This topic is locked and can not be replied to.