Yes, see here Re: extract the value before a particualr string.
In reply to Re^3: extract the value before a particualr string by hdb in thread extract the value before a particualr string by nanban