Hello Guys.
I am trying to retrieve some data based on two strings: "Alq" and "IR".
The ideia here is, Alteryx finds the string "IR" or "ALQ" within a field, once it detects it should bring the words next to it.
So for this example:
IR RECOLHIDO PELO CLIENTEx000D_I.R. R$: 29,610.43_x000D_Alq.: 15%
Alteryx finds "IR". Then it should bring the next 20 words so a new field is created with "IR RECOLHIDO PELO CLIENTE" and the same thing with "ALQ" but with 10 words only.
Is it possible? I tried using Findstring and CONTAIN but I can think of any formula to bring words next to it.
Thanks
Solved! Go to Solution.
You certainly can achieve it with Regex under Parse mode. Assuming that IR always come before Alg
The Regex string can be something like
^.*(IR.{20}).*(ALQ.{10}).*$
dawn
Hello @DawnDuong .
I feel like REGEX is one of the best tools in Alteryx, but at the same time one of most unpopular tools. Such interesting things can be created with it.
I tried replicating that to my workflow, but for some reason it comes as blank: Would you know if I'm missing something?
For this example You need fo use it under parse mode, to extract the 2 groups
@DawnDuong I tried and its still coming as blank. I'm very sorry, I'm not accustomed to use REGEX tool.
Can you guide me through it? I attached my sample
Anyone can help me pls?
Hi @Joker_Hazard ,
The problem is that if what follows Alq is not at least 10 characters long, the regex pattern is not going to match. ( Find attached the workflow )
If you want to match at most the 10 characters that follow Alq, you can use the pattern {1,10} to say that you retrieve all the values after within the limit of 10 characters.
In our case, we have Alq.: 15% so less than 10 characters after the Alq. So pattern {10} will not work.
Is that clear enough and good enough for you?
it sure is Mr Goku. Thank you very much!!!