Blog Archive

Monday, June 11, 2018

python Regular expression operations

6.2. re — Regular expression operations — Python 3.6.5 documentation:



findall example:

input:

import re

f='blues.00004.au-10-10_3_4sec.mp3'

song_start_time = re.findall("\d+",f)

song_start_time



output:

['00004', '10', '10', '3', '4', '3']




'via Blog this'

No comments:

Post a Comment