Added str.replace.by.blocks

Can replace substrings by blocks, i.e. we have a powerful bracket
macthing functionality