Extracted extents regex code to own function
Added tests for extent regex
Using pre-compiled regex pattern for finding extents
get_extents function returns -1 on error