The SCASW and SCASL instructions walk down the string looking for the character sequence in the AX or
EAX registers,
but they do not perform a character-by-character comparison.
Instead, the EDI register is incremented by either 2 (for SCASW) or 4 (for SCASL) after each comparison, not by 1. This means that the character sequence must also be present in the proper sequence within the string.