str = "abcde\n fghij<Foobar>";expression = '(.*)<Foobar>*';[tokens,matches] = regexp(str,expression,'tokens','match');celldisp(tokens)
Standard input is empty
tokens{1}{1} = abcde fghij
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!