def __init__( self, quoteChar, escChar=None, escQuote=None, multiline=False, unquoteResults=True, endQuoteChar=None):
super(QuotedString,self).__init__()<EOL>quoteChar = quoteChar.strip()<EOL>if len(quoteChar) == <NUM_LIT:0>:<EOL><INDENT>warnings.warn("<STR_LIT>",SyntaxWarning,stacklevel=<NUM_LIT:2>)<EOL>raise SyntaxError()<EOL><DEDENT>if endQuoteChar is None:<EOL><INDENT>endQuoteChar = quoteChar<EOL><DEDENT>else:<EOL><INDENT>endQuoteChar = endQuoteChar.strip()<EOL>if len(endQuoteChar) == <NUM_LIT:0>:<EOL><INDENT>warnings.warn("<STR_LIT>",SyntaxWarning,stacklevel=<NUM_LIT:2>)<EOL>raise SyntaxError()<EOL><DEDENT><DEDENT>self.quoteChar = quoteChar<EOL>self.quoteCharLen = len(quoteChar)<EOL>self.firstQuoteChar = quoteChar[<NUM_LIT:0>]<EOL>self.endQuoteChar = endQuoteChar<EOL>self.endQuoteCharLen = len(endQuoteChar)<EOL>self.escChar = escChar<EOL>self.escQuote = escQuote<EOL>self.unquoteResults = unquoteResults<EOL>if multiline:<EOL><INDENT>self.flags = re.MULTILINE | re.DOTALL<EOL>self.pattern = r'<STR_LIT>' %( re.escape(self.quoteChar),<EOL>_escapeRegexRangeChars(self.endQuoteChar[<NUM_LIT:0>]),<EOL>(escChar is not None and _escapeRegexRangeChars(escChar) or '<STR_LIT>') )<EOL><DEDENT>else:<EOL><INDENT>self.flags = <NUM_LIT:0><EOL>self.pattern = r'<STR_LIT>' %( re.escape(self.quoteChar),<EOL>_escapeRegexRangeChars(self.endQuoteChar[<NUM_LIT:0>]),<EOL>(escChar is not None and _escapeRegexRangeChars(escChar) or '<STR_LIT>') )<EOL><DEDENT>if len(self.endQuoteChar) > <NUM_LIT:1>:<EOL><INDENT>self.pattern += (<EOL>'<STR_LIT>' + '<STR_LIT>'.join(["<STR_LIT>" % (re.escape(self.endQuoteChar[:i]),<EOL>_escapeRegexRangeChars(self.endQuoteChar[i]))<EOL>for i in range(len(self.endQuoteChar)-<NUM_LIT:1>,<NUM_LIT:0>,-<NUM_LIT:1>)]) + '<STR_LIT:)>'<EOL>)<EOL><DEDENT>if escQuote:<EOL><INDENT>self.pattern += (r'<STR_LIT>' % re.escape(escQuote))<EOL><DEDENT>if escChar:<EOL><INDENT>self.pattern += (r'<STR_LIT>' % re.escape(escChar))<EOL>self.escCharReplacePattern = re.escape(self.escChar)+"<STR_LIT>"<EOL><DEDENT>self.pattern += (r'<STR_LIT>' % re.escape(self.endQuoteChar))<EOL>try:<EOL><INDENT>self.re = re.compile(self.pattern, self.flags)<EOL>self.reString = self.pattern<EOL><DEDENT>except sre_constants.error:<EOL><INDENT>warnings.warn("<STR_LIT>" % self.pattern,<EOL>SyntaxWarning, stacklevel=<NUM_LIT:2>)<EOL>raise<EOL><DEDENT>self.name = _ustr(self)<EOL>self.errmsg = "<STR_LIT>" + self.name<EOL>self.mayIndexError = False<EOL>self.mayReturnEmpty = True<EOL>
Defined with the following parameters:
 - quoteChar - string of one or more characters defining the quote delimiting string
 - escChar - character to escape quotes, typically backslash (default=None)
 - escQuote - special quote sequence to escape an embedded quote string (such as SQL's "" to escape an embedded ") (default=None)
 - multiline - boolean indicating whether quotes can span multiple lines (default=False)
 - unquoteResults - boolean indicating whether the matched text should be unquoted (default=True)
 - endQuoteChar - string of one or more characters defining the end of the quote delimited string (default=None => same as quoteChar)