Help

Re: Extract text between two strings

1285 0
cancel
Showing results for 
Search instead for 
Did you mean: 
Subir_Kumedan
6 - Interface Innovator
6 - Interface Innovator

Hi everyone.

I’m trying to extract a string that occurs between the same left string, but the right string has 2 possibilities

The bolded string is what I’d like to extract

  1. VAR. 1 - between > and >
    Industry > Banking & Finance > Trading (1.0)

  2. VAR. 2 - between > and (
    Industry > Banking & Finance (1.0)

Thanks a ton for your help.
Subir

1 Reply 1

Welcome to the community, @Subir_Kumedan! :grinning_face_with_big_eyes: Here’s a formula that will do the trick. Replace {FIELD_NAME} with the name of your field:

TRIM(MID(SUBSTITUTE(SUBSTITUTE({FIELD_NAME}, " > ", REPT(" ", 50)), " (", REPT(" ", 50)), 50, 50))

Screen Shot 2020-07-25 at 1.19.30 PM

As long as the piece you want to extract is after the first “>”, this will work. If its position differs based on other conditions, it won’t.