From: Sora Harakami Date: 2010-06-15T07:45:23+09:00 Subject: Re: split doesn't work On Tue, Jun 15, 2010 at 7:19 AM, Jennifer Lee wrote: > I have code: > > <% @terms.each do |term| %>> > >  <%regex = Regexp.new(/#{term}/)%> >  <%matchdata = regex.match(@def_str)%> >  <%if matchdata%> > >    <%  @def = @def.split(/#{term}/) %> >    <%  @def.shift %> > >  <%end%> > <%end%> Hi, >    <%  @def.shift %> This line is run only and doesn't output value. So change this line to: <%= @def.shift %> to solve this problem. Thanks. -- Sora Harakami - @sora_h Blog: http://codnote.net/ Detail: http://sorah.cosmio.net/