Hi-I am trying to parse out a string using Fi...

Hi-I am trying to parse out a string using Find and Left expression. I am having trouble grabbing the characters in the middle. For example, if this is my string (110054:06MAR2019-USA_NEW) how would I parse out the middle portion?

0 3 542
3 REPLIES 3

+Steve Coile

Thanks for the reply and yes I am trying to parse out 06MAR2019

I tried your expression but nothing returned although the expression was valid. I then tried this =RIGHT(([Scan Text], FIND(":",[Scan Text])), LEFT([Scan Text], FIND("-",[Scan Text]))) but I cant get the FIND associated with RIGHT to work. Any suggestions on Syntax?

Hope this helps you, works for me. Pull Zipcode out of this Address 1208 MOULTRIE RD, ALBANY, GA 31705, USA =RIGHT(F2,(len(F2)(find(", ",F2))))

Removes Street =RIGHT(G2,(len(G2)(find(", ",G2))))

Removes City =LEFT(H2,FIND(",",H2)-1) Removes , USA =RIGHT(I2,5)

Removes State

The โ€œmiddle portionโ€ being 06MAR2019?

left(right([Column], (find([Column], โ€œ:โ€) + 1)), (find([Column], โ€œ-โ€) - find([Column], โ€œ:โ€) - 1))

Which is:

right([Column], (find([Column], โ€œ:โ€) + 1)) extracts the text in the [Column] column beginning at (right(โ€ฆ)) the character immediately following (find(โ€ฆ) + 1) the colon (find(โ€ฆ, โ€œ:โ€)), which would be 06MAR2019-USA_NEW.

left(โ€ฆ, (find([Column], โ€œ-โ€) - find([Column], โ€œ:โ€) - 1)) then extracts from that result (06MAR2019-USA_NEW) the first so-many characters (left(โ€ฆ)) equal to the number of characters between the colon and the minus ((find(โ€ฆ, โ€œ-โ€) - find(โ€ฆ, โ€œ:โ€) - 1)) in the original text ([Column]), giving 06MAR2019.

I havenโ€™t tested this; itโ€™s off the top of my head. Test accordingly.

Top Labels in this Space