MATLAB: Do strfind and regexp may lead to a different result

MATLABregexp

Hi all,
I noticed that regexp and strfind may lead to different results. Here an example:
regexp('Infinitely Variable Transmission (IVT)','Infinitely Variable Transmission (IVT)')
Why does it occur?
Thanks

Best Answer

regexp( 'Infinitely Variable Transmission (IVT)', 'Infinitely Variable Transmission \(IVT\)' )
works, but you have to escape the parenthesis as they have special meaning in a regexp expression.
if you look in
doc regexp
in the section headed 'Split Text at Delimiter Using split Keyword', there is an example of this for escaping the ^ symbol.