A more idiomatic way of doing this could be : 

    show_imperial = /both|imperial/.test(scale_opt)