You could specify the regex pattern /^$/ to look for the first blank line,
or /^foobar/ to look for the first line that starts with the word foobar.
by David Winterbottom (codeinthehole.com)
There are couple of other ways you can do so, like using sed, awk.
<command> |sed –quiet \’/svn_/,$ !p\’
Related articles by Zemanta
- Using Regular Expressions – Part 2 of 4 – Regex in PHP (geekology.co.za)
- Implementing text pattern matching languages in LLVM (ianloic.com)