protected static function convertUnicodeCharacters($str, $inCharacterClass, $dotAll)
	{
		// Replace \x{....} with \u.... -- Note that only BMP characters are supported
		$str = preg_replace('((?<!\\\\)(?:\\\\\\\\)*\\K\\\\x\\{([0-9a-f]{4})\\})i', '\\u$1', $str);

		// Unfold Unicode properties such as \pL
		$str = self::unfoldUnicodeProperties($str, $inCharacterClass, $dotAll);

		return $str;
	}
protected static function convertUnicodeCharacters($str, $inCharacterClass, $dotAll)
	{
		// Replace \x{....} with \u.... -- Note that only BMP characters are supported
		$str = preg_replace('((?<!\\\\)(?:\\\\\\\\)*\\K\\\\x\\{([0-9a-f]{4})\\})i', '\\u$1', $str);

		// Unfold Unicode properties such as \pL
		$str = self::unfoldUnicodeProperties($str, $inCharacterClass, $dotAll);

		return $str;
	}
protected static function convertUnicodeCharacters ( $ str , $ inCharacterClass , $ dotAll ) { // Replace \x{....} with \u.... -- Note that only BMP characters are supported $ str = preg_replace ( '((?<!\\\\)(?:\\\\\\\\)*\\K\\\\x\\{([0-9a-f]{4})\\})i' , '\\u$1' , $ str ) ; // Unfold Unicode properties such as \pL $ str = self :: unfoldUnicodeProperties ( $ str , $ inCharacterClass , $ dotAll ) ; return $ str ; }
Replace Unicode characters and properties in a string

NOTE: does not support \X

@link http://docs.php.net/manual/en/regexp.reference.unicode.php

@param  string $str              Original string
@param  bool   $inCharacterClass Whether this string is in a character class
@param  bool   $dotAll           Whether PCRE_DOTALL is set
@return string                   Modified string
Replace Unicode characters and properties in a string