Print the substring of 2 characters, starting at the 7th position:
<?xdofx:substr('18818T12',7,2)?>
Determine the position of the 'T' character, -1 means starting from the back of the string. Add 1 because we want to start at the character following the 'T':
<?xdofx:instr('18818T12','T',-1)+1?>
To determine the length of what we want to print, we need the total length string and we subtract the length of the string up to and including our last 'T' character:
<?xdofx:length('18818T12')-Instr('18818T12','T',-1)?>
Putting all of this together:
<?xdofx:substr('18818T12', Instr('18818T12','T',-1) +1,length('18818T12')-Instr('18818T12','T',-1))?>