str='abcasdjasjdasjabcasjdasjabc';  % st6.m
pat='abc';
s1=findstr(str,pat)
s2=strmatch(pat,str)
s3=strrep(str,pat,'123')
[s4 s5] = strtok(s3,'123')
