sed-example.org 327 B

echo 'abc :results output :eval no' | sed -E 's#.*(results [[:alnum:]]{1,}).*#\1#'

This demonstrates the following uses of GNU sed:

Extended regexps

-E

Substitution

s#OLD#NEW#

Character classes

[[:alnum:]]

"bounds"

{1,0} (could be +)

replacement

s#(FOO)#\1#