I have tried to extract a number as given below but nothing is printed on screen:
echo \"This is an example: 65 apples\" | sed -n \'s/.*\\([0-9]*\\) apples/\\1/
$ echo "This is an example: 65 apples" | sed -r 's/^[^0-9]*([0-9]+).*/\1/' 65