From: Peter Hickman Date: 2011-10-31T20:10:32+09:00 Subject: Re: Anything like FS in Ruby? If you are parsing HTML you could of course use AN HTML PARSING LIBRARY!!!!! Failing that you could use the split command from available from the String class mystring.split(//) But I recommend a Nokogiri for parsing HTML and XML. See also http://weblogs.asp.net/alex_papadimoulis/archive/2005/05/25/408925.aspx On 31 October 2011 10:40, Wayne Brissette wrote: > Coming over from AppleScript, one of the things I haven't been able to find is something like AppleScript's Text Item Delimiters or Awk's FS, where you can define separators for text files. For example, if I have something like this: > > 1 > 2 > > If I set FS to , then I could capture 1, and 2. > > While this isn't a great example because there are many other ways to capture this via regex. This becomes more useful with much more convoluted things. I haven't been able to find anything similar in Ruby, which probably means I need to rethink how I capture blocks of text and store them into arrays and hashes. > > Wayne >