How can i delete tabkey space on body

Hi I have a question,
How I can delete tabkey inside the body,
I have this string:

But between script tags theres 2 tabs
I try using this regular expression inside a view:

$ re = “~

] +> K [^ <] * + (= ?) ~ “;
$ Subst = ”;
$ ValBody = preg_replace ($ re, $ subst, $ valBody);

but I can get it

can you please help me.
Thanks

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/2/feed