This expression will be used to validate codes that can be up to 10 characters long, but it cannot be the code of "COM" anything else is ok. I have tried a few things but not quite there. Any suggestions will be great.
Dim pattern = "^((?!COM).){10}$"
Is COM the whole code? COMxxxx? xxxxxCOM?
In that case set repeat to range {1,10}.characters up to 10 in length