I want to give users a text area where they can enter text. Later I will match that input against a different input and extract it if matched.
Flow:
You need to escape the input: http://www.ruby-doc.org/core/classes/Regexp.html
See the method escape.
escape
Regexp.escape(your_input)