I am facing problem to extract date value which is in a paragraph text.
Sample para:
I am an IT professional working in Southern India.
I joined my new organization on April 20, 2024
My requirement happened through campus hire program.
I will be working on UiPath and Dot net related projects.
As per my use case, i will define start keyword and end key work which is IT and mode respectively and i want to extract the date which is in the second line.
My current regex patterns is : (?<=IT\s)(.*?)(?=requirement ) but it gets all the below text,
professional working in Southern India.
I joined my new organization on April 20, 2024
My
How to achieve the above problem statement in single regex ? Please help
Thank you for your suggestion. But can you help me with start and end string along with date regex as that will be more useful for my realtime use case…
In the above para Line, i need to extract the date my DOJ i.e April 20,2024. As per the design my regex should have the defined start keyword and end keyword and along with that my date regex patter should also be there.
My current regex : (?<=IT\s)(.*?)(?=recruitment)
My current output :
professional working in Southern India.
My DOJ : April 20, 2024 at Bengaluru
My
If it works, please mark my post as solution to close the loop.
inputString = "My DOB : May 1, 1989 at Chennai
I am an IT professional working in Southern India.
My DOJ : April 20, 2024 at Bengaluru
My recruitment happened through campus hire program.
I will be working on UiPath and Dot net related projects."
outputString = System.Text.RegularExpressions.Regex.Match(inputString,"(?<=IT[\s\S]*?)\w+\s*\d+\,\s*\d+[\s\S]*?(?=[\s\S]*?recruitment)").Value.Trim()