I have a string that happens to contain ‘\0’, which I need to
substitute for a %x flag a la sprintf. Unfortunately, the ‘\0’ gets
substituted for the initial match. So, this:
path = ‘C:\Artist\Album\01 Title.mp3’
puts ‘%l’.sub(/%l/, path)
I’m sure there’s some way to disable the substitution that doesn’t
involve contortions with escaping the backslashes, but I don’t know
what it is. Anyone?