Local corrections on string processing:

* Corrected regexp: `[x|y]` -> `[xy]`.
* Used an re:replace/4 option instead of multiple IOlist functions.
Rebasing. Fix differences with c26b0c7 c996e98 b690842.
Merge pull request #171 from fenollp/using-stdlib

Some optimisation/refactoring using stdlib's functions