What does \\ x80 - \\ xFF refer to?

In the process of finding solutions to help sanitize some of the results, I came across code that does the following.

preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\|*\'()\\x80-\\xff]|i', '', $some_url)

Now I think that he is basically trying to remove anything other than the above characters. But does \\x80-\\xffany form of non-printable ascii character apply? If so, why does the code probably try NOT to delete them?

Any directions / pointers / help would be appreciated. Thank.

+4
source share
3 answers

Well, all the answers so far have led me in the right direction and allowed me to find the following in the documentation .

\x ( ). UTF-8 \x {...}, . UTF-8, . escape-,\xhh, UTF-8, 127.

, : -

i) '\ x' escape-,

ii) '\ xhh' "hh"

iii) '\ xhh' 0-FF

iv) '\ x80-\xFF' ASCII

+5

x80 - xFF , ASCII. , -1, UTF-8.

\\x80 \x80 . . , .

, \x80 PHP, \\x80 regex.

+3

PHP, , (, ).

, heredoc nowdoc, , .

+1

All Articles