I need to replace a word after multiple spaces :
actually the file contains this string :
local all all
sed -r -i.bak '/^local\s+(all\s+){2}peer$/s/\S+$/md5/' file