Regular Expressions 101

Community Patterns

Community Library Entry

0

Regular Expression
Python

r"
Vous\savez\srecu\sun\stransfert\sde\s(?P<amount>\d+)FCFA\sde\s(?P<sender_name>.*)\s\((?P<sender_phone>\d+)\)\sle\s(?P<when>.*?)\..*ID.*transaction\s.*?(?P<transaction_id>\d+)\.*
"
gm

Description

A regex to extract meaningful infos from a Momo message (mobile money) which is recurrent in Africa.

Submitted by Hans T. - a year ago