**Input**: The input is read from a text file: `while ($data = FGets($soubor)) { ... }`.

**Output**: I would like to safe content to DB (import) without `\n \t`.

I think, that it offers an alternative for trim:

```
while () ...
$editedText = trim($data, "\t");

```

I need \t, \n and check in **whole** txt document. Any suggestions and samples?

**What is the best way for this easy task without RE**?