xxx:[<b>yyyyy1</b>] yyy:[xxxx]
xxx:[<b>yyyyy2</b>] yyy:[xxxx]
....
$ printf "xxx:[<b>yyyyy1</b>] yyy:[xxxx]\or:[<b>yyyyy2</b>] yyy:[xxxx]" | grep -oE '<b>[[:alnum:]]+</b>' | sed -E 's/<\/?b>//g'
yyyyy1
yyyyy2
$ printf "xxx:[<b>yyyyy1</b>] yyy:[xxxx]\or:[<b>yyyyy2</b>] yyy:[xxxx]" | perl -e 'while(<>){ if ($_ =~ m/<b>(.*)<\/b>/){ print $1."\n"; } }'
yyyyy1
yyyyy2
cat /tmp/33.sh | egrep -o "<b>\w+" | sed 's/<b>//g'
Find more questions by tags bash
sed -n < a.txt 's/.*\[<b>\(.*\)<\/b>\].*/\1/gp'
by the way what is this job interview job ? it is not necessary to chicity on a job interview please - alfonso_Hudson80 commented on April 19th 20 at 12:16