On Jun 9, 9:37 am, anon_comp <[email protected]> wrote:
> Here's my code
>
> def index
>     file = "BLAH-ex201588.doc"
>     @file_cut = order.gsub(/[\w [- ! # $ % ^ & * = +]+]+\.doc$/,
> '*.doc)
> end
>
> The code worked before when I was using Ruby 1.9.1, but now I'm using
> Ruby 1.8.7 due to technical reasons. I would imagine that it should
> still work, but I doesn't. If I removed the nested brackets and it's
> contents, it'll work, but will only cut the string to "BLAH-*.doc"
> instead of "*.doc"
>
> Please help.
>
> Thanks,
> Anon_comp


This is absolutely ridiculous lol. This is the second time I've asked
a question and was able to solve it myself. Guess if I just keep
working for another day, I'll eventually get the answer -____-

Thank you all for reading. Don't need help anymore. All I had to do
was remove brakets and escape the speical characters dispite the fact
that documents say that you don't have to escape them.

Anon_comp

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to