May-23-2019, 02:04 PM
Hi,
I have below code to catch a string between two strings using a code as below:
I want to catch a string between '.csv' & _ just before .csv. Desired output is: JCET01, but using below code is giving the out I desired.
I have below code to catch a string between two strings using a code as below:
I want to catch a string between '.csv' & _ just before .csv. Desired output is: JCET01, but using below code is giving the out I desired.
import re filename='input_file_JCET01.csv' result = re.search('_(.*).csv', filename)