-
RegExp 정규식 숫자 찾기flutter 파헤치기 2024. 2. 12. 01:13
Flutter
void main() { // RegExp : 숫자 찾기 String text = 'Hello, this is an example text 20with some 65 numbers like 12345 and symbols like @#\$'; RegExp regex = RegExp(r'\d+'); // Match one or more digits Iterable<Match> matches = regex.allMatches(text); for (Match match in matches) { print('Found match: ${match.group(0)}'); } }
Output
flutter: Found match: 20 flutter: Found match: 65 flutter: Found match: 12345
'flutter 파헤치기' 카테고리의 다른 글
Flutter in Action 플러터 인 액션 (2) 2024.02.14 VSCode Shortcuts for Flutter Development (1) 2024.02.13 flutter에서 ?, ! 의미는? (0) 2024.02.12 flutter에서 (_) 의 의미는? (0) 2024.02.12 Collection for (0) 2024.02.12