How do I match all the words in a string except the one I specify using REGEXP in MATLAB 7.0 (R14)?

15 次查看(过去 30 天)

采纳的回答

MathWorks Support Team
You can match all words except the one you specify by executing the following commands:
testStr = 'The seed of the tree has linseed and is seedless';
matchs = regexp(testStr, '\<(?!seed\>)\w*', 'match')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Characters and Strings 的更多信息

产品

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by