Is there a list of characters that look similar to English letters?

前端 未结 4 1562
情歌与酒
情歌与酒 2020-12-12 22:44

I’m having a crack at profanity filtering for a web forum written in Python.

As part of that, I’m attempting to write a function that takes a word, and returns all p

4条回答
  •  無奈伤痛
    2020-12-12 23:04

    I created a python class to do exactly this, based on Robin's unicode link for "confusables"

    https://github.com/wanderingstan/Confusables

    For example, "Hello" would get expanded into the following set of regexp character classes:

    [H\H\ℋ\ℌ\ℍ\

提交回复
热议问题