You need a variable to track whether a match was found. I recommend setting it to 0 before the while loop, then incrementing it for each match. After the while loop, if the variable is false (still equal to 0) then print your "not found" message. This technique has the added benefit of providing you with the number of matches.
In reply to Re: Sorry message
by sutch
in thread Sorry message
by bobbyboy
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |