This might not be quite the question you\'re expecting! I don\'t want a regex that will match over line-breaks; instead, I want to write a long regex that, for readability,
You need to use the /x modifier, which enables free-spacing mode.
/x
In your case:
"bar" =~ /(foo| bar)/x