該程序顯示類型錯誤:預期的字符串或緩衝區模式在馬來亞匹配使得類型錯誤:預期的字符串或緩衝區
# coding=utf-8
import re
s = [u'ഓ൪മകളൂടെ സുഗന്ധം പേറുന്ന ഒരു പൂക്കാലം.']
v={'q':s[0].encode('utf-8')}
match = re.search(r'സുഗന്ധം', s)
if match:
print 'found', match.group()
else:
print 'did not find'
我不認爲我們可以重新使用其他成績單/字母 – 2014-10-10 18:02:24
看到,例如:http://stackoverflow.com/questions/14859957/regular-expressions-with-indian-characters – 2014-10-10 18:03:47
我應該怎麼做模式匹配在馬拉雅拉姆我可以得到的代碼 – nkv 2014-10-10 18:04:39