file_name_to_preprocessing_method("heloc_dataset_v1(exc empty rows.).csv_pre(-1,asis).csv")
should return the string "(-1,asis)", possibly using .find().
.find()
Using re.findall for a regex approach:
re.findall
inp = "file_name_to_preprocessing_method("heloc_dataset_v1(exc empty rows.).csv_pre(-1,asis).csv")" matches = re.findall(r'csv_pre((.*?))', inp) print(matches[0]) # (-1,asis)
2.1m questions
2.1m answers
60 comments
57.0k users