I would like to search for a pattern in a file which I can do easily with something like:

```

gc $filename | select-string $pattern

```

However once I have found this first pattern, using the location (line) of the first match as a starting point I would then like to start searching for a second pattern. Once the second pattern has been matched I would then like to return all lines between the first and second matches, discarding the matched lines themselves.