Hi There,
I need to extract part of this string, i have looked through the forum and cannot find any suggestions for extracting text where there is not much consistency with the data:
I have text which looks like this:
PAY-TEST PAYMENT 00000000 JOHN SMITH M3000111111
DEPOSIT ONLINE 2121212 PYMT TONY TEST M3000222345
DEPOSIT ONLINE 2648975 PYMT TEST NAME M3000369785
OTHER TEXT TEXT TEXT REF NO 0123456 MELB TEXT REF: M5000789456
From each line of text I only need to extract the numbers after the letter M, i,e from M5000789456 I only need 5000789456
Each line is always different, the numbers/reference number i need to extract are almost always at the end of the string, most times there is no other text after these numbers.
The only things which are always the same:
Each string will have a reference number which will always start with M
Each reference number will always start with M and proceed with either the number 3 OR 5
Can i please get some assistance as the best way to get this reference number?
Thanks