2014-01-13 21 views

回答

1

使用Unicode block\p{InHangul_Compatibility_Jamo}(U + 3130 - U + 318F)。

的Python 3.x的例子(使用第三方regex模塊):

>>> import regex 
>>> regex.findall(r'\p{InHangul_Compatibility_Jamo}', '한ㅎㅏㄴ글') 
['ㅎ', 'ㅏ', 'ㄴ'] 
>>> regex.findall(r'[\u3130-\u318f]', '한ㅎㅏㄴ글') 
['ㅎ', 'ㅏ', 'ㄴ'] 
相關問題