regexp command expr(?!test) assertion fail

18 visualizzazioni (ultimi 30 giorni)
Satyam Agrawal
Satyam Agrawal il 19 Set 2020
Commentato: Satyam Agrawal il 19 Set 2020
While using regexp command in following example :
I am expecting result to be 'Retiring' 'lovable' 'runtastic' but instead I am getting the following result:
Can someone please explain why is it so?

Risposte (1)

Walter Roberson
Walter Roberson il 19 Set 2020
Commencement matches \w* because it all word forming characters. It is followed by something that is not 'ment ' because the space after Commencement is not 'm'.

Categorie

Scopri di più su Characters and Strings in Help Center e File Exchange

Prodotti


Release

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by