Question: I am loading text from a file that contains a sequence like:

```
abc\ndef\tghi

```

I want to 'unescape' all special characters, e.g. to treat the `\n` as a newline and `\t` as a tab etc. instead of automatically ending up with e.g. `\\n` or `\\t` in the string.

Is there an easy way to do this?

Answer: 
The text will be loaded exactly as it is in the file. If the file has the literal text \ and n instead of a newline, that is what will be loaded. If there is a known set of escapes you want to change, you could simply `gsub` them 

```
line='abc\ndef\tghi'
line.gsub!('\n', "\n")
line.gsub!('\t', "\t")

```
how about YAML.unescape ?

```
require 'syck/encoding'
require 'yaml'

YAML.unescape("\\n")

```