Hi, I'm trying to get a chunk of chars from a String which has a special format. My String will always have 80 chars and I need to retrieve a pattern of seven numbers. Example: 'R VASCO BRANCALEONI 0000042 AX CASA 02 3 ' I need to separate what is before the 0000042 into $Address variable, then the 0000042 into $AddressNumber variable and the rest after 0000042 into a $AddressComplement variable. I tried to first declare the three String variables and parsing when I have a number match, something like that: if (length(trim(substring($BVS_Full_Address_Input,$Counter,6))) = 6 and isMatch(trim(substring($BVS_Full_Address_Input,$Counter,6)),'^([0-9]+)$')) then trim(substring($BVS_Full_Address_Input,$Counter,6)) else '' My $Counter will start with 0 and I would increment it until the end of the string. But the Loop element is only for lists, right? So, I'm lost... I don't know how to do it. Anyone can help me here? Thanks a lot!
create a variable in de MF. Use the loop to set your positioning and the substring to update the variable until you find the string you want
Lex van Rooy
Thanks, Lex. I found out the solution, and yes is like you said. I've got chunks of 7 chars until I found the match. Then once I find the address number position I get what is in the right based on my counter variable and what is after as address complement, always using substring. I was lost because I was trying to use the Loop element, but I don't need it of course.