Why do strfind and regexp may lead to a different result?
9 views (last 30 days)
Adam on 12 Jun 2017
Edited: Adam on 12 Jun 2017
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
in the section headed 'Split Text at Delimiter Using split Keyword', there is an example of this for escaping the ^ symbol.
More Answers (1)
Walter Roberson on 12 Jun 2017
In the general case, regexp can return different results if the pattern includes metacharacters.
There is a routine that can be used to "escape" characters so that they are treated literally, but the routine name is not coming to mind at the moment.