I'll give an easy example. Let's say I'm interested in letters 'A' to 'Z', only upper case but want to stop after hitting an invalid character. An example input string is "ABC\nDummy Text". Now I can easily make a mask by doing loadu, subtract 'A', then simulate a cmple by using _mm256_max_epu8 and _mm256_cmpeq_epi8. Now I have the following
A B C \n D u m m y T e x t
FF FF FF 00 FF 00 00 00 00 00 FF 00 00 00
How do I clear all the FF's after the first 00?