Help to write Regex Pattern to find job title comes together with experience date?

Hi,

Required regex patter to split company title from the below list.
I have used the below regex pattern:
)\s*([^0-9]+)\s*\d{1,2}/\d{4}(?:\s-\s\d{1,2}/\d{4})?$ which did not help me to find Credit Manager from the last list.

Cloud Innovators Solution (9 months)Social Media Marketing Specialist1/2020 - 10/2020
StoriCamPK (less than a month)Marketing Communications Manager7/2022
Coleman Estate Agents (13 years, 11 months)Director8/2009
Coleman Estate Agents NewYork (13 years, 11 months)Director8/2009
TCS (less than a month)Head of Search Engine Optimization ➤ Brand & Strategy || Go-to-market Strategy || Content Marketer8/2010
Collins Securities Pty Ltd (less than a month) Credit ManagerInvalid date

image

@Gowthaman_Gajakutti

Hi
for company names try the below one

inputstr.Split({“(”},StringSplitOptions.RemoveEmptyEntries).First

for job title use below

system.text.regularexpression.regex.match(inputstr,“(?<=))[A-Za-z\s➤&|-]*”).value

cheers

Hello

Take a look here at this pattern:
(?<=\))(.+?)(\d\/\d{4}.*)

Cheers

Steve

Hi @Steven_McKeering Thanks for response.
The regex pattern is not helping to find job title “Credit Manager” from the last record. Please check it.

All right @Shiva_Nikhil

Hello

Take a look here

How should we handle the Invalid date value? Capture it or Ignore it?

Cheers

Steve

I need to capture job title text (“Credit Manager”) before invalid date

@Gowthaman_Gajakutti

This is one way you can try

(?<=\)).*

Cheers

Yep no worries

But what about the “Invalid date” text?

@Gowthaman_Gajakutti

check this once

@Anil_G Thanks for your response.
Need to capture from the list even if experience date is invalid date
Social Media Marketing Specialist
Marketing Communications Manager
Director
Director
Head of Search Engine Optimization ➤ Brand & Strategy || Go-to-market Strategy || Content Marketer
Credit Manager

You dont need the Date?

@Steven_McKeering

Need to capture from the above list even if experience date is invalid date.

Capture details look like:
Social Media Marketing Specialist
Marketing Communications Manager
Director
Director
Head of Search Engine Optimization ➤ Brand & Strategy || Go-to-market Strategy || Content Marketer
Credit Manager

Hi

Well try this pattern:
(?<=\))(.+?)(?=\d|Invalid)

I thought you needed the date also.

1 Like

Thanks @Steven_McKeering. It works fine.

1 Like

Good news

Always happy to assist :blush:

@Gowthaman_Gajakutti

As per above it did capture all

Cheers

@Steven_McKeering
I need support.
The pattern (?<=))(.+?)(?=\d|Invalid) was working fine for the below job titles:
Capture details look like:
Social Media Marketing Specialist
Marketing Communications Manager
Director
Director
Head of Search Engine Optimization ➤ Brand & Strategy || Go-to-market Strategy || Content Marketer
Credit Manager

In this case, it is not working. When job title has () before date. Sample job titles.

Regional Aviation Association of Australia (RAAA)
Catalina’s (Rose Bay) Pty Ltd

Can you give me solution? Thanks in advance.

Hi

From this sample input, what do you need as the output?

Can you provide the whole line?

Cheers

Steve

Hello

Does this work?

Cheers

Steve