# File lib/puppet-lint/lexer.rb, line 306 def get_string_segment(string, terminators) str = string.scan_until(/([^\\]|^|[^\\])([\\]{2})*[#{terminators}]+/) begin [str[0..-2], str[-1,1]] rescue [nil, nil] end end