The OPs code already implements a solution by cutting of at the beginning and the end of the array, so we can safely imply his desired spec!
In reply to Re^3: Print 5 lines before and after pattern match from a list
by hdb
in thread Print 5 lines before and after pattern match from a list
by jayu_rao
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |