Instead of using regular expresson to check if one word is a substring of another, why not use index instead.
It is a simple function that returns the offset of the shorter string within the longer one if it is a substring, or -1 it it is not. The kind of thing you expect to find in the string libaries of programing languages without regular expresson support, but so rarely used by perl programmers that most of us have forgotten the function exists.
In reply to Re: Words in Words
by chrestomanci
in thread Words in Words
by sarchasm
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |