@Sharayu, please provide more details, Help us help you.
For example the number 01120812 does its length varies? and if so does it vary in a way that it could be minimum of 8 numbers and a maximum of 10 numbers in length? for example.
to successfully write a regex that works accurately we need to know things like that.
length of columns with numbers will not vary but the alphabets size may vary and it is fixed
example- KVK number is of length - 8
Vestigingsnr.-- length is 12
Without any extra information a more future-proof Regex Pattern is hard to create. I have used the excessive (2 or more) spaces between each piece of text as the anchors. Variable F might need a trim in the example below or some extra brackets inserted.
But regardless here is my Regex solution: regex101: build, test, and debug regex (\d+)(\s\s+)(\d+)(?<! )(\s\s+)(.)(\s\s)(.)(\s\s+)(\d\d)(\s\s+)(\d\d\d\d\D\D)(\s\s+)(\w+)
Run your text through a “Matches” Activity using the above pattern then use the output variable in an “Assign” activity for each variable:
you can also try this arrayVar = System.Text.RegularExpressions.Regex.Split(yourStringVar,“\s{3}”)
this will return all the values and you can store them in a variable based on index
And its always good practice to check if the regex output variable is not null or empty before trying to use it, it avoids possible error. just use an if activity to check and if it is empty at least let it notify you or log that instead of breaking the entire process.