iswm as stated by the help is a wildcard match,

a wildcard match is a string of text with the "*" character meaning "any set of 0 or more characters" and "?" meaning "exactly one character". If you don't specify any of these wildcard characters in a match, the comparison is made literally, from the beginning of the string to the end:

(HELLO iswm HELLO WORLD) is equivalent to (HELLO == HELLO WORLD) without wildcards -- this obviously will not work.

If you wrote *HELLO it would search for anything ending in HELLO

HELLO* would look for anything beginning with HELLO

*HELLO* would be anything with HELLO inside of it

The last behaviour, if you didn't catch it, is equivalent to that of the isin operator.


So really, iswm is a superset of the isin functionality. If you're only testing the existence of a substring in a larger string, use isin. If you have specific constraints on where the substring should be (beginning, end, or more complex constraints), use iswm to build a wildcard match.

- argv[0] on EFnet #mIRC
- "Life is a pointer to an integer without a cast"