I have a line couple of several lines structured similarly to this and i want to remove everything except the last character. Can anyone advice on a regex everything i had found so far was to remove everything after Template and just end up with P,T,U 

etc and for all these lines i want to end up with:
`<name>Doc_TEMPLATE_P
<name>Doc_TEMPLATE_T
<name>Doc_TEMPLATE_U`