voraa,
<pre>
<script>
const rs = /^\s*?(?=\t+[ \n]*?\S)/mig
let s2 = '\n\t \n\t\t Журнал'
document.writeln(s2.replace(rs, '').replace(/\t/g, 'T').replace(/\s/g, 'S'))
let s3 = '\n\t\n\t\tЖурнал'
document.writeln(s3.replace(rs, '').replace(/\t/g, 'T').replace(/\s/g, 'S'))
let s4 = ' \t \t\tЖурнал'
document.writeln(s4.replace(rs, '').replace(/\t/g, 'T').replace(/\s/g, 'S'))
let s5 = ' \t \n Журнал'
document.writeln(s5.replace(rs, '').replace(/\t/g, 'T').replace(/\s/g, 'S'))
let s6 = '\t\tЖурнал'
document.writeln(s6.replace(rs, '').replace(/\t/g, 'T').replace(/\s/g, 'S'))
</script>
</pre>