I need to create a conditional that looks for product codes that all start with the same set of characters, for example, CUSTOM

I've tried digging through code samples but I'm not quite finding what I need.