Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

String parsing from the end

HA
8 - Asteroid

Hi,

I have a large log file that I need to parse and search for specific tags, based on a certain logic. There are some cases that the logic seems to be too complicated for Alteryx because Alteryx doesn't have a string function to search from the end of a string.(like Findstring but search from the end not beginning of a string).

 

simplified example:

Original string : 1490175939957 CAPITALFIX-FXCFX IN [FXCFX//38.160.70.92:54448] 1903=FIX.4.49 =53235=834=642 1903=FXCFX50 =ams.kas.tgoossens52=20170322-09:45:39.930 1903=CAPITALFIX57 =lon.capital.rmichalak 8=FIX.4.49= 1906=5 1490175939957 8=FIX.4.49=53235=8  

 

For the sample string given above the logic is to first find tag 1906 and if it's equal 5  1906=5 (easy to do  using Alteryx string functions) then search back and extract the value for tag 1903=. This is the part that I don't know how to do in Alteryx because if I use findstring to search for tag 1903 it will return the first occurrence of that tag which is   1903=FIX.4.49 but I need the last occurance which is 1903=CAPITALFIX57.

 

I hope my explanation of the requirements was clear. I would appreciate any suggestion on how to do this type of search in alteyx    

10 REPLIES 10
Joe_Mako
12 - Quasar

The parentheses mean the characters inside are the capture group, the capture group is what is returned by the code $1.

 

What we have inside the capture group parenthesis is .* and this means:

. = any character

* = zero or more times

 

does this help?

Labels