I’m stuck in trying to grep anything just after name=, include only spaces and alphanumeric.
name=
e.g.:
name=some value here
grep does not extract like you expect. What you need is
grep "name=" file.txt | cut -d'=' -f1-