Using this:
grep -A1 -B1 \"test_pattern\" file
will produce one line before and after the matched pattern in the file. Is there a way to di
3 characters before and 4 characters after
$> echo "some123_string_and_another" | grep -o -P '.{0,3}string.{0,4}' 23_string_and