I have to remove the P12 2018 , P13 2018 , P01 2019 part from the above string 1 , string 2 and string 3.
here the the string to be removed can come anywhere in the main string.
You can try something like this (pseudo code):
myString = “1-PEPPAYACCTG QUEUE GL Reconciliation: PBC-US 20029004 ACCRUED UNION ADMIN PENSION P12 2018”
if (myString.Contains(“P12 2018”)) then
myString = myString.Replace(“P12 2018”, vbNullString)
end if