Draft implementation of custom inspect algorithm for regexes