That helps but when i run this program i dont see any output. basically the control is not entering the while loop at all. Also what is the difference between * and *? ie a greedy and reluctant quntifiers? How does the execution change if we use a *? instead of greedy??
This concept is not clear in K&B. Please help sirisha