[Python] Extract IBAN from text with Python

Discussão em 'Python' iniciado por Stack, Julho 7, 2025.

  1. Stack

    Stack Membro Participativo

    I want to extract IBAN numbers from text with Python. The challenge here is, that the IBAN itself can be written in so many ways with spaces bewteen the numbers, that I find it difficult to translate this in a usefull regex pattern.

    I have written a demo version which tries to match all German and Austrian IBAN numbers from text.

    ^DE([0-9a-zA-Z]\s?){20}$


    I have seen similar questions on stackoverflow. However, the combination of different ways to write IBAN numbers and also extracting these numbers from text, makes it very difficult to solve my problem.

    Hope you can help me with that!

    Continue reading...

Compartilhe esta Página