What does some symbol in regular express mean?

조회 수: 1 (최근 30일)
tqy
tqy 2012년 9월 5일
댓글: Walter Roberson 2015년 2월 28일
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?

채택된 답변

Rolfe Dlugy-Hegwer
Rolfe Dlugy-Hegwer 2012년 9월 5일
(?<=expr) - Look behind from current position and test if expr is found.
  댓글 수: 2
Oleg Komarov
Oleg Komarov 2012년 9월 5일
A small simplification (legit?)
regexp(num2str(x), '(?<=(^|\s+)[\-\.0]*)[1-9](?=[\d\.]*)', '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