반응형
# 작은 따옴표 안의 문자
re.findall("'([^']*)'", your_string)
# 큰 따옴표 안의 문자
re.findall('"([^"]*)"', your_string)
사용 사례
js = javascript:goDelvTrack('111111','한진택배','222222222222','https://www.hanjin.co.kr/kor/CMS/DeliveryMgr/WaybillResult.do?mCode=MN038&schLang=KR&wblnumText2=222222222222','33333333333333')
js_splits = re.findall("'([^']*)'", js)
print(js_splits)
# 결과
['111111', '한진택배', '222222222222', 'https://www.hanjin.co.kr/kor/CMS/DeliveryMgr/WaybillResult.do?mCode=MN038&schLang=KR&wblnumText2=222222222222', '33333333333333']
반응형
'프로그래밍 > python' 카테고리의 다른 글
python apscheduler BackgroundScheduler start specific times (0) | 2022.10.13 |
---|---|
xlsx 파일을 xls로 변환 (0) | 2022.10.12 |
dataframe contains and operation 여러 조건을 만족하는 데이터 필터링 (0) | 2022.10.05 |
문자열에서 숫자만 가져오는 여러 방법 (0) | 2022.09.29 |
현재 날짜 가져오기 및 특정 일자 더하기 (0) | 2022.09.28 |