Here in my code I can remove a digit from the end of a string. How do i remove if there is more than one number?
i need to parse data between AM/PM and the last number for e.g.:
3:59 PMthis is me22
if i input the above i only need to get
this is me
test cases
Alan Chettan CRN1:53 PMfffadfs3
Alan Chettan CRN1:53 PMthis is a text message3
+94949494 1:22 PM
Supplement exam alert4:43 PMRohith:Daa S4 machines question paper undo? Electrical?1
Billy Gate3:59 PM2
+91 96330 945893:42 PMHi1
3:59 PMthis is me22
my regex code
((A|P)\M)(.*)([0-9]+[0-9]|[0-9])