I am kind of new to Perl, but I think that you can do a
split() on the line you have, using split('character')
where character is whatever you want to split the line with.
Then just loop the new array searching for your string again.
That should then give you a matching string which has been
stripped at whatever character you choose to split with.