WordPress/Sniffs/DB/PreparedSQLPlaceholdersSniff.php
protected function get_regex_quote_snippet( $stripped_content, $original_content ) {
		$regex_quote = $this->regex_quote;

		if ( $original_content !== $stripped_content ) {
			$quote_style = $original_content[0];

			if ( '"' === $quote_style ) {
				$regex_quote = '\\\\"|\'';
			} elseif ( "'" === $quote_style ) {
				$regex_quote = '"|\\\\\'';
			}
		}

		return $regex_quote;
	}
protected function get_regex_quote_snippet( $stripped_content, $original_content ) {
		$regex_quote = $this->regex_quote;

		if ( $original_content !== $stripped_content ) {
			$quote_style = $original_content[0];

			if ( '"' === $quote_style ) {
				$regex_quote = '\\\\"|\'';
			} elseif ( "'" === $quote_style ) {
				$regex_quote = '"|\\\\\'';
			}
		}

		return $regex_quote;
	}
Retrieve a regex snippet to recognize and remember quotes based on the quote style
used in the original string (if any).

This allows for recognizing `"` and `\'` in single quoted strings,
recognizing `'` and `\"` in double quotes strings and `'` and `"`when the quote
style is unknown or it is a non-quoted string (heredoc/nowdoc and such).

@since 0.14.0

@param string $stripped_content Text string content without surrounding quotes.
@param string $original_content Original content for the same text string.

@return string