im using Matches activity inside i used regex pattern to extract certain 4 to 6 lines and i want to convert that ouput variable to string.
Hello @sathish_Kumar6
Just use for each loop provide matches as input and for current item provide .tostring.
Remember (.tostring should be provided to only match variable type not matches.)
If you are having only one match…then matches activity actually gives to an output of the first or single string as well
cheers
Actually i want to extract all the words so based on that only i used another logic so is that possible
You want to store that into an Array and then you can retrieve whatever values you need either by looping or indexing.
Thanks.
Use a for loop and give matches as in argument and change type argument to match
then inside loop use currentitem.value to get each matched value for each iteration
if you need all at once with comma separation use this
String.Join(",",matchesoutput.Cast(Of System.Text.RegularExpressions.Regex.Match).Select(function(x) x.value).ToArray)
cheers
where to give my matches output variable in this
String.Join(“,”,matchesoutput.Cast(Of System.Text.RegularExpressions.Regex.Match).Select(function(x) x.value).ToArray)
okay now i get it so is there any to get all stored in one varibale like all words in one string variable
ok instead of looping is there any way to get all words in one string variable
System.Text.RegularExpressions.Regex.Matches(“hello thre 532443 it the otp”,“\d”).ToArray
put Input text variable and replace \d with your expression. you will get the array.
Manupulate the array to get whatever output you want.
Please try this
String.Join(",",matchesOutput.Select(function(x) x.value).ToArray)
cheers
Thanks a lot… it worked
Actually my requirement is different @Shubham_Kinge anyway thanks for trying to help me
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.