Skip to main content
Solved

Extract part of a string between same character, "

  • July 27, 2020
  • 2 replies
  • 34 views

I have a field with a value "feather29sum"cxa. I need to extract the feather29sum only and ignore everything else. Can someone please help with this formula?

Best answer by Justin_Barrett

This should work:

TRIM(LEFT(SUBSTITUTE({Field Name}, '"', REPT(" ", 25)), 50))

Breakdown, in to out:

  • The SUBSTITUTE() function replaces the quotes with blocks of 25 spaces.
  • We then grab the left-most 50 characters, which picks out the first 25 spaces, all of the text you want, and some portion of the next 25 spaces.
  • We then trim off the spaces.

2 replies

Justin_Barrett
Forum|alt.badge.img+21

This should work:

TRIM(LEFT(SUBSTITUTE({Field Name}, '"', REPT(" ", 25)), 50))

Breakdown, in to out:

  • The SUBSTITUTE() function replaces the quotes with blocks of 25 spaces.
  • We then grab the left-most 50 characters, which picks out the first 25 spaces, all of the text you want, and some portion of the next 25 spaces.
  • We then trim off the spaces.

  • Author
  • New Participant
  • July 28, 2020

This should work:

TRIM(LEFT(SUBSTITUTE({Field Name}, '"', REPT(" ", 25)), 50))

Breakdown, in to out:

  • The SUBSTITUTE() function replaces the quotes with blocks of 25 spaces.
  • We then grab the left-most 50 characters, which picks out the first 25 spaces, all of the text you want, and some portion of the next 25 spaces.
  • We then trim off the spaces.

Thanks Justin, this is exactly what I needed.