preg_match does't work with utf8 characters

Any questions involving matching text strings to patterns - the pattern is called a "regular expression."

Moderator: General Moderators

Post Reply
pendrive
Forum Newbie
Posts: 2
Joined: Wed Mar 02, 2011 4:11 am

preg_match does't work with utf8 characters

Post by pendrive »

Hi all
I have some information in a mysql database table that inserted with utf8_encode() method. Then none english characters appeared with this format :
(I put space between letters so u can see their format . . . If you remove space characters, you'll see the utf8 characters)& # 1 5 7 5 ; & # 1 7 4 0 ; & # 1 6 0 6 ; & # 1 5 7 5 ; & # 1 6 0 8 ; & # 1 6 0 4 ; & # 1 7 4 0 ; and . . . .
every things is good except one! that's when I wanna use preg_match() function to match some characters, I did't match any thing but I know it,s wrong
I remember I used to use preg_match( '/(\p{L}*)some character(\p{L}*)/i',$mystrings,$regs); and that did well every things well for none english characters, Some where people say me use this pattern: /regular/iu
but it did'n help me too.
please help me to solve this problem
tnx for regards
pendrive
Forum Newbie
Posts: 2
Joined: Wed Mar 02, 2011 4:11 am

Re: preg_match does't work with utf8 characters

Post by pendrive »

no body wanned to help me?????
Post Reply