Re: String pattern for chinese word
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: String pattern for chinese word
- From: Patrick Rapin <toupie300@...>
- Date: 2012年4月16日 15:17:17 +0200
If your "s" string was UTF-8 encoded [1], the following test could be used.
I know this is not 100% correct, but may be sufficient for most needs :
for i in string.gmatch(s,"'([%w\x80-\xbF\xC2-\xF4]+)'") do
print(i)
end
[1] \x.. string notation do not work inside a [[ ]] construct !