Python - pyparsing unicode characters

后端 未结 3 1778
伪装坚强ぢ
伪装坚强ぢ 2020-12-16 16:54

:) I tried using w = Word(printables), but it isn\'t working. How should I give the spec for this. \'w\' is meant to process Hindi characters (UTF-8)

The code specif

3条回答
  •  失恋的感觉
    2020-12-16 17:19

    I Was searching about french unicode chars and fall on this question. If you search french or other latin accents, with pyparsing 2.3.0 you can use:

    >>> pp.pyparsing_unicode.Latin1.alphas
    'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyzªµºÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõöøùúûüýþÿ'
    

提交回复
热议问题