Help with regular expression to extract specific string

Hello,

please assist me i have a string as “REV RDMP0000000000000095MPAY 30.3.2021” and I am try to extract “RDMP0000000000000095” only.

0000000000000095 can be of any length.
for example it could be
REV RDMP000000000000004445MPAY - 989 - today
and what i want is “RDMP000000000000004445”

Thank you

@MasterOfLogic

Taking REV and MPAY as constant you can check as below

Hope this may help you

Thanks

1 Like

Thanks bro , but MPAY or REV might not always be there . the only thing I am sure of is RDMP followed by an unknown length of numbers then we can have a special character as break or a non digit

@MasterOfLogic - Please try this…

Regex Pattern:

RDMP\d+

Assumption: RDMP will be there always

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.