Posted on

RED – How to find text on multiple lines

Here is your regular expression of the day:

firstLineOfText[\r\n]+[^\S]*secondLineOfText

Notice that this will skip empty lines so if your text is double spaced or more a match will still be made.  Also notice that the second line can start with any amount of white space, which helps a lot when you indent your lines with spaces or tabs.

Happy Searching!