![]() |
![]() |
![]()
Post
#1
|
|
![]() Grupa: Zarejestrowani Postów: 1 597 Pomógł: 30 Dołączył: 19.02.2003 Skąd: Tychy Ostrzeżenie: (0%) ![]() ![]() |
Mam taki przykładowy kod. Niestety w przypadku pierwszym nie usuwa mi 1/4, a dodatkowo zamienia na niezidentyfikowany znak. Czy ma ktoś na to radę? Jak usunąć zbędne znaki z tekstu poza zdefiniowanymi. Testowane na PHP5.1. Ten post edytował sf 23.01.2007, 16:57:04 -------------------- Zapraszam na mój php blog, tworzenie stron.
|
|
|
![]() |
![]()
Post
#2
|
|
![]() Grupa: Przyjaciele php.pl Postów: 5 724 Pomógł: 259 Dołączył: 13.04.2004 Skąd: N/A Ostrzeżenie: (0%) ![]() ![]() |
Cytat If you want to perform regular expressions on Unicode strings, the PCRE functions will NOT be of any help. You need to use the Multibyte extension : mb_ereg(), mb_eregi(), pb_ereg_replace() and so on. When doing so, be carefull to set the default text encoding to the same encoding used by the text you are searching and replacing in. You can do that with the mb_regex_encoding() function. You will probably also want to set the default encoding for the other mb_* string functions with mb_internal_encoding(). ? -------------------- Nie lubię jednorożców.
|
|
|
![]()
Post
#3
|
|
![]() Grupa: Zarejestrowani Postów: 1 597 Pomógł: 30 Dołączył: 19.02.2003 Skąd: Tychy Ostrzeżenie: (0%) ![]() ![]() |
Niestety mb_ereg_replace sobie z tym nie radzi, sprawdziłem chwile po tym jak napisałem posta.
-------------------- Zapraszam na mój php blog, tworzenie stron.
|
|
|
![]() ![]() |
![]() |
Aktualny czas: 20.08.2025 - 13:03 |