필터 지우기
필터 지우기

What will be the regex for this type of string?

조회 수: 1 (최근 30일)
Meenal
Meenal 2022년 10월 21일
답변: Rik 2022년 10월 21일
The regular expression should accept string like:V123456_123456_123456.
  1. String must start with V.
  2. Then any number of digits.
  3. _(underscore) character followed by any number of digits.
  4. Finally an _ character then any number of digits.

답변 (1개)

Rik
Rik 2022년 10월 21일
expr = 'V/d*_/d*_/d*';
Or, if 'any' actually means '1 or more':
expr = 'V/d+_/d+_/d+';

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

제품


릴리스

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by