in reply to remove content

This should do it for you.
#!/usr/bin/perl use strict; my $str = q{^C^D^V^V^A os08 34917 080806 R S 0808050150 00006157^B{T}} +; print $` if ( $str =~ /\{T\}/ );