I'm trying to process a text file and recognize certain patterns using regular expressions. I want my program to recognize patterns such as:
Pattern\n
Pattern \n
Pattern \n
etc. I want to be able to recognize the pattern with any number of white spaces or tabs (is there a difference?) between "Pattern" and the carriage return.
I've looked at How to ignore whitespace in a regular expression subject string? but I don't understand why they have a slash in the front and back of the expression.
How do I use regex to do this?