Implementation of regex grabbing from files