Q:

How to "grep" a string of a returned result

How to grep the number 50.0 from the string temp=50.0'C
In JavaScript I can use the expression /temp=(.*?)'C/ to get it.
But I can't get it running in grep. 

A:

You can use lookbehinds and lookaheads after enabling PCRE (via -P):
root@xxxxxxvlp03 ~ $ echo "temp=50.0'C" | grep -Po "(?<=temp\=).*(?=\'C)"
50.0
root@xxxxxxvlp03 ~ $

A:

Or you can use sed to extract a matching subgroup in a pretty similar way to your Javascript example:
echo "temp=50.0'C" | sed "s/temp=\([^']*\)'C/\1/"

