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:
tempstring.split(/\[|\]/)
Maybe... tempstring.split(/[\]\/)
I can't think of a why irb likes yours, but not rails though...