kimkyuseok / study_git

study_git
0 stars 0 forks source link

import re 파일 패턴으로 이름찾기 #36

Open kimkyuseok opened 7 months ago

kimkyuseok commented 7 months ago
import re

file_name = "simulation_test_mod_v001_w01.mb"
pattern = r"(.*?)_v(\d{3})_w(\d{2}).mb"

match = re.match(pattern, file_name)