in reply to Pattern matching

Hi Bedanta,

I think u r not testing properly.

It's working fine!!!

Thanks

Gopal.R

Replies are listed 'Best First'.
Re^2: Pattern matching
by bedanta (Novice) on Dec 29, 2004 at 06:48 UTC
    The code was not working as it was matching patterns with "lds" in them as well
      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