Regular Expression to find date

I need to find a date using regular expression which is available in particular sections…
For example … i am having a sections like
i worked in xyz company -Nov 2017- Jun 2020
i worked in abc company - Apr 2015-Nov 2017
zzz certification- March 2019-May 2019”
i need to find out only the dates which are available only inside the work experience section.
Thanks in advance.

You can do like this also
forum soluton

Best Regards,

ya… but in some resumes, the experience will be different.
xyy Chennai, TN
Position: Market Research Executive Nov 2018 – Jun 2020
zzz Chennai, TN
Position: Market Research Executive Nov 2019 – Jun 2020

Hi @shnega,

I hope this will help you.

Regex : (\w{3}\s+\d{4})|(\w{5}\s+\d{4}) or (\w{3}\s+\d{4}-(\s+)?\w{3}\s+\d{4})|(\w{5}\s+\d{4}-(\s+)?\w{3}\s+\d{4})


Thanks for your reply…But i dont want to select the dates in certification part. i need only the dates available in work experience section.

1 Like

Hello @shnega

Regex : (\w{5}\s+\d{4}(-)?(\s+)?\w{3}\s+\d{4})

1 Like

Thanks… But it is fetching date in certification section.i need dates only in work experience.
i want to find dates between 2 sections. …it have to fetch all the dates inside that particular section

Hello @shnega

Regex : (-)(\s+)?\w{3}\s+\d{4}(-)?(\s+)?\w{3}\s+\d{4}

Urvesh Mistry


thanks … is there any option to search date like this…(Work experience)(regular expression)(Certification)?
i need to find the date between any of 2 sections …so i need to check with that section name

You can try this first extract the whole data between those sections with the help of this Regex given in image

and then Extract the Required date using regex which is given in previous reply.

1 Like

Hello Thanks for your time. But the regex which you gave is selecting only the two lines… Below is the sample of my text file. I wanted the year from the professional Experience block only.

Professional Experience

XXX Chennai, TN
Position: Market Research Executive Nov 2018 – Jun 2020

Extensive experience in market research and business planning.
Researched and identified market opportunities for product growth.
Market research analysis for target market including market trends,new technologies and products etc.
Lead generation.
Corporate profiling.
Competitor analysis.
Email marketing and digital marketing.
Sales campaign and cold calling.
Set up a meeting with clients and prospects companies.

YYY Chennai, TN
Position: Research Analyst Nov 2016 – Nov 2018

Collaborate with senior management in development and enhancement of knowledge and thought, methodologies & frameworks, and capability content.


	ABC UNIVERSITY			*Degree: Bachelor of Technology			* Stream: Information Technology	

Anna University * Scored: 6.74 (CGPA)
Chennai * Graduated in 2016

Class XII
Matric School * Scored: 72.00%
Chennai * Completed in 2012

Class X
State Board * Scored: 75.00%
Chennai * Completed in 2010