What does some symbol in regular express mean?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
tqy
il 5 Set 2012
Commentato: Walter Roberson
il 28 Feb 2015
x = [1 0.3 -2 0.001 -0.00016, 582398, 3020];
regexp(num2str(x), '(?<=(^|\s+)[\-\.0]*)[1-9](?=\d*\.?\d*)', 'match')
What does these symbol '<' '=' mean?
How this expression work, first do what, then do what?
0 Commenti
Risposta accettata
Rolfe Dlugy-Hegwer
il 5 Set 2012
(?<=expr) - Look behind from current position and test if expr is found.
2 Commenti
Oleg Komarov
il 5 Set 2012
A small simplification (legit?)
regexp(num2str(x), '(?<=(^|\s+)[\-\.0]*)[1-9](?=[\d\.]*)', 'match')
Walter Roberson
il 28 Feb 2015
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Characters and Strings in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!