Regex to shorten code and to bugfix long text refs