in reply to Re^2: Pattern matching
in thread Pattern matching

it was matching because you used .* as a greedy match, which swallowed up any string including "lds", then (correctly) matched following characters as not containing "lds" etc. try changing the greedy .* to the non-greedy version .*?
the hardest line to type correctly is: stty erase ^H