str = "abcde\n		fghij<Foobar>";
expression = '(.*)<Foobar>*';
[tokens,matches] = regexp(str,expression,'tokens','match');
celldisp(tokens)