Suppose I have enter no using input dialogue activity , no will be like:- 4589
And I want to split no like:-
How can I do??
Here’s a solid post I found that may allow you to find a solution
you can use “Strvalue.ToCharArray” like below
1- Create Variable for your string (Str) with your value.
2- Create Array of type Char under system.char (arrstr)
3- use assign activity as arrstr–> Str.ToCharArray
4- then use for each loop on you arrstr.
Screen of process:
Screen of Variables:
Screen of Output:
Hi @Naveen_Kumar2 ,
Is this what you were looking for?
There are two ways to achieve this using Regex →
System.Text.RegularExpressions.Regex.Matches(str_rawString,"\d").Cast(Of Match).Select(Function(s) s.ToString).ToArray()
System.Text.RegularExpressions.Regex.Split(str_rawString,"(?<=\d)"). Where(Function(w) Not (IsNothing(w) OrElse String.IsNullOrEmpty(w.ToString))).ToArray()
MatchingWithoutDelimiters.xaml (5.3 KB)
Hi Can you please give explain both of regex expression for better learning I really appreciate you.
I did not understand “Cast(Of Match).Select(Function(s) s.ToString).ToArray()”,“Split(str_rawString,”(?<=\d)").
Where(Function(w) Not (IsNothing(w) OrElse String.IsNullOrEmpty(w.ToString))).ToArray()"
The pattern detects the empty gaps between each number:
Then Where clause in the LINQ filters out empty results(Blanks) and converts the rest to Array.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.