regex - textscan delimiter = "abc" does not work -


i trying read text file has textual data , separated delimiter 'abc' consecutive characters separating string want read.

ex: text.txt file, follows:

john abc mike abc micheal  sandra abc sarah abc david 

i tried following code did not work because delimiter not single character:

user = textscan(fid, '%s%s%s','delimiter','abc'); 

any highly appreciated

use regular expression:

user = regexp(str, 'abc', 'split') 

where str (cell)string read like:

str = textscan(fid, '%s','delimiter','\n') 

Comments

Popular posts from this blog

javascript - jquery or ashx not working -

opencv - DataType<cv::detail::deriv_type>::depth what is it used for -

python 3.x - Mapping specific letters onto a list of words -