added row-extracting functions using regex