#!/bin/bash
s='object.word_to_extract123'
grep -oP '(?<=object\.)\w+' <<< "$s"
sed -nE 's/.*object\.([[:alnum:]_]+).*/\1/p' <<< "$s"