Extract Text & number from message

Macro_Mitch

New member
Hi. I'm trying to design a macro which can extract account details and phone number from specific message received. Here is an example
QE950Q84KD Confirmed, on 9/5/22 at 8:23 AM Ksh250.00 received from ANN MUTHONI NJENGA 254722892403, Account Number roysambu New Utility balance is Ksh15,850.00
In above example, roysambu is account details, and 254722892403 is phone number. The two are different in every message as shown in picture. Thanks in advance.View attachment 2678
 

Macro_Mitch

New member
Hi. I'm trying to design a macro which can extract account details and phone number from specific message received. Here is an example
QE950Q84KD Confirmed, on 9/5/22 at 8:23 AM Ksh250.00 received from ANN MUTHONI NJENGA 254722892403, Account Number roysambu New Utility balance is Ksh15,850.00
In above example, roysambu is account details, and 254722892403 is phone number. The two are different in every message as shown in picture. Thanks in advance.View attachment 2678
IMG-20220509-WA0000.jpg
I tried with this regex but it's only extracting account details and leaving phone number
 

FrameXX

Well-known member
Use action text manipulation > extract text > check 'group 1'.

Regex for account details:
Account\sNumber\s(.*?)\sNew\sUtility

Regex for phone number:
received\sfrom\s(?:.*?)\s([0-9]{3,12}),
 
Last edited:
Top