I'm using Python to get title names for a header in a program. Each title comes like: "OXD/Overview Controls", "OXD/BULK/BULK Details Controls" and more... Currently I am using a value/split() method to remove the "/" returning only "OXD Overview Controls" and "OXD BULK", however I would like to remove the "OXD" and "Controls" portions of the string. Any help is appreciated, my current code is listed below.
if value <> None:
value = value.split("/")[:2]
value = ' '.join(value)
else:
value = ""
return value.upper()