some stuff
<fmt:message key="I_am_A"/> and some time later there is also <fmt:message key='I_am_B'/>
and even more stuff
I_am_A
I_am_B
How far I got:
grep "fmt:message" input.txt | sed -E 's/.*key=['\''"]([^'\''"]*)['\''"].*/\1/'
Which will output:
I_am_B