How to extract an attribute from using bash

In some projects the version is written in the file using the attribute:

I usually use this version as the version to be tagged in the Sonar server, for code analysis. This way, it is easier to have metrics more accurate when checking the new code against the previous release.

How to get the version. Alue using bash:
cat | “ˆ\sversion\s=“ | cut -d’=‘ -f2

And for the definition

you should see