I need a RegEx pattern which matches from “where” to the end of the line (\n). For example, these would match:
"where x = 5\n"
"where x = 5 and y = 6\n"
"where (x = 5) and (y = 6) or (z = 7)\n"
So basically the pattern must start with “where” and end with a new-line character “\n”.
EDIT: RegEx pattern will be used in a Ruby (on Rails) project…
You didn’t specify your language, but the following is pretty universal:
$is end of line.iis the flag for case insensitive.