Regular Expressions 101

Community Library

Community Library Entry

0

Regular ExpressionOpen Workspace

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
Created·2023-06-27 14:29
Type·Match
Flavor·Python

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

Submitted by Hans T.
Open Workspace