1. Fixed regex to match the lines not ending with new lines
2. Added prompt character '% '