Skip to main content

Hello I feel this is fairly simple but I can't find anything on it. I know how to remove certain characters and a certain amount of characters before or after a character. But in this case I want to remove a certain character. 3 from the right. In other words K1czam15 the M needs to go so it's K1cza15

M is always the character I need to remove and there will always be two digits in front of it, but I can't just remove M because it may appear elsewhere in the string and I need to keep it if it does. Any ideas? Thanks as always in advance. 

try 

m(?=.{2}$)

Worked like a charm. Thanks as always Marian you're the best!


Reply