I have a field for which I want to extract the first few characters of a string which are always followed by an underscore character (_). The length of the string is variable but what I'm interested in extracting is what precedes the underscore.
for example, my string could be:
xyz_Company1
or it could be
QRS STUVWXYZ_Company2
how can I extract for these examples only xyz and QRS STUVWXYZ
thank you for your help!