Added some regexp garbage code but fixes realization names