Help

Re: Extracting text from an inconsistent string of text

Solved
Jump to Solution
537 1
cancel
Showing results for 
Search instead for 
Did you mean: 
Sara_Ophoff
6 - Interface Innovator
6 - Interface Innovator

Hello! I am currently trying to extract information from an inconsistent string of text and having a tough time.

Ideally, I would be able to drop the MONTH and DATE from the String of text and KEEP the all the text along with just theYEAR. 

The trouble is, both the intro text (represented as X's) and the dates are not consistent lengths. 

EXAMPLES OF TEXT:  DESIRED OUTPUT: 

XXXXX.RTW.Men.7.5.2023

XXXXX.RTW.Men.2023

XXX.RTW.Women.12.10.2022

XXX.RTW.Women.2022

XXXX.RTW.11.6.2022

XXXX.RTW.2022

Is there a formula that can do this? I am not great at these types of formulas (and I feel like this is potentially very simple!) - hoping someone can help! 

Let me know if I can provide further info to provide a solution. Thank you in advance for your help! 

1 Solution

Accepted Solutions
Sho
11 - Venus
11 - Venus

Hello @Sara_Ophoff ,

For Regex, it's like this.

REGEX_REPLACE({Text},".\\d+.\\d+.",".")

 

See Solution in Thread

2 Replies 2
Sho
11 - Venus
11 - Venus

Hello @Sara_Ophoff ,

For Regex, it's like this.

REGEX_REPLACE({Text},".\\d+.\\d+.",".")

 

@Sho thank you!!!! This worked perfectly!!