Implemented line matching with wild cards