improved reg_match for BASE_URL - v0.3.3