MATLAB: Find/remove 2 consecutive letters from string

MATLABregexpregexprep

Tried the regexp(regexprep) family, still don't know how to get this to work…
I have a cell array of strings, some of which looks like: '.XNY.N'
I simply need to check the cell array, if there is a .N or .M, remove it. Same as in excel you select an array and replace .N and .M with empty.
So in this case '.XNY.N' will be '.XNY'
Anyone knows how to do that? Thanks in advance!

Best Answer

regexprep('.XNY.N','[.]N','')