• aaaaaaaaargh@feddit.org
        link
        fedilink
        arrow-up
        1
        ·
        24 days ago

        Naja, den Inhalt der Gruppe muss man natürlich auch noch verarbeiten. Es gibt in der Tat \p{Extended_Pictographics}, aber das hat bei mir noch nie funktioniert.

    • luciferofastora@feddit.org
      cake
      link
      fedilink
      arrow-up
      1
      ·
      17 days ago

      Depending on the platform the bot is implemented with, there are emoji-regex packages that can at least match the characters, even if counting them might be difficult. I believe python 3.3+ has support for counting displayed characters, so title[:3]="ich" and len(title[3:-3]) in (1, 2, 3) and title[-3:]="iel" should work for the length check.