I’m studying string manipulation to find a solution for my project, but I can’t find anything that fits perfectly with what I need. can someone point me the way?
I need to find the order number between an information set.
-the string may appear as PEDIDO: Pedido: Ped:
-does not have a specific amount of characters and can be at the beginning or end of the string
Valor Imp. Aprox.: Federal 60.13 Estadual 82.16 Municipal 0.00) Fonte: IBPT Solicitacao: 1ssss6 Pedido: 020477;cst 060 ref. ICMS ret. p subst. tributaria decreto 42303 10 conforme anexo 1.PROCON RJ TEL: 151 www.procon.rj.gov.br ALERJ Tel: 0800 282 7060 www.alerj.rj.gov.brPROCON MACAE(22)2759 0801 Rua Velho Campos,734 Centro Macae RJ
Hmmmm this is a tough one, not because of the beginning of the string, but the end of the string.
In order to get the string, you could use an OR statement to specify PEDIDO: OR Pedido: OR Ped: but the variable holding the string would have to know where to end… but I’m guessing since your documents are coming from all different sources, it isn’t standardized what comes ‘after’…
For this solution, I didn’t really use any resource, so over time I just kind of remember a few useful tricks and double check the solution using a Write Line or MsgBox. Before that, I would “Google” how to do a certain thing in Regex .net.
The non-greedy ‘?’ on .+? or .*? was a recent thing I learned.
The RegexOptions such as IgnoreCase is actually a part of the syntax if you look inside UiPath with the rollover popup message while typing it out and is optional.
The look behind and look ahead is something (if I can’t remember) which is easily googled.