jagoan-neon Posted July 11, 2008 Share Posted July 11, 2008 Hello again, I know how to find and match all latin character using this regex [A-Za-z ]+ but how to tell php to find non latin character like japan or chinese character? maybe [some_weird_character]+ Help please. Thank You. Quote Link to comment https://forums.phpfreaks.com/topic/114301-solved-find-non-latin-character/ Share on other sites More sharing options...
jagoan-neon Posted July 11, 2008 Author Share Posted July 11, 2008 I'm using PHP preg and want to find all Japanese character Quote Link to comment https://forums.phpfreaks.com/topic/114301-solved-find-non-latin-character/#findComment-587787 Share on other sites More sharing options...
effigy Posted July 11, 2008 Share Posted July 11, 2008 Do mean non-Latin-1 or non-ASCII? What is the data encoded in? UTF-8, CJK...? Quote Link to comment https://forums.phpfreaks.com/topic/114301-solved-find-non-latin-character/#findComment-587794 Share on other sites More sharing options...
jagoan-neon Posted July 11, 2008 Author Share Posted July 11, 2008 I read some article at http://unicode.org/reports/tr18/ and try this regex, and its working. i dont know why and how but its working. [\p{Lo}\p{Lm}+]+ strange... for a beginner like me. Quote Link to comment https://forums.phpfreaks.com/topic/114301-solved-find-non-latin-character/#findComment-587809 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.