KOTA ITO

Generation

generate functionFri, 16 Dec 2022

文字列の中から、「調査対象期間:」と「〜」に囲まれた日付の文字列だけを取得する

import re def get_date(text): return re.search('調査対象期間:(.*)〜.*', text)[1] get_date(text)

Questions about programming?Chat with your personal AI assistant