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:
[“word”, “field”, “word2”, “field2”,…]
However, when I attempt to make the exact same call in a rails
controller, I get the following error message on the line where
String#split is called.
“can’t convert Regexp into String”
However, I don’t know why it should be trying to convert my Regexp into
a string, when the API shows you can use strings or regular expressions.
If you can’t figure it out from what I have given and need more code to
look at, let me know.