Python Extract Substring Between Two Strings For Dreadlocks