fixed row/column detection in regexp. fixed test