String#split works w/ Regexp in IRB, not in rails

I'm trying to take a string in the format "word[field] and
word2[field2]...", etc. I have gotten this to work when splitting it in
IRB using the following syntax:


Maybe... tempstring.split(/[\]\[]/)

I can't think of a why irb likes yours, but not rails though...