in reply to Can anyone make this regex job neater?

You can match and edit substr:
if (/^OBX(?:[^|]*|){2}([^^]*)/) { substr($_, $-[1], length($1)) =~ s/(?=([a-z]))/$1 > 'Z' ? 'L' : 'U +'/ge; }
Can't test it, so it might need some tweaking.

Caution: Contents may have been coded under pressure.