Do I win a prize for gratuitous use of string functions?
This is using SQL Server, but I assume other systems have similar functions.
Code:
declare @string as varchar(40)
set @string='abc= 2bv= 1fed= 30thb= 200'
select ltrim(substring(substring(@string,charindex('fed',@string)+4,len(@string)), 1,patindex('%[a-Z]%',substring(@string,charindex('fed',@string)+4,len(@string)))-1))
That assumes the number following 'fed' is always followed by a letter. If it's "@" or "$", it won't work. Of course, you need to adapt for your table and column.