For a given string from a World Bank Data URL or partial URL, extract the code for the variable, but not the location

get_wb_variable_code(text)

Arguments

text

String that is the URL or partial URL from World Bank Data for a given variable