How can we get multiple matches value from string and store in a variable from regex

Example :- F23.20 k12.60 Z66.00 Z80.80 M55.88 F44.10 F12.22

I need to get F23.20,F44.10,F12.22 from this string uses regex


Check below

Use Matches activity and write the above expression which will output you a list of results

hope this may help you


1 Like

how can we save multiple results in a variable

is also depending from your needs. One of the options is to store it into a string array

ensure following:

Assign Actvitiy:
arrValue | DataType: String() - StringArray
Regex.Matches(YourStringVar, "\bF[\d\.]+\b").Cast(Of Match).Select(Function (x) x.ToString).toArray

if Our value have in Text variable the how can we do that

please share some sample text on which you can illustrate the details of your question. Thanks

F24.20 Coca F50.89 Mixe M54.9 Chro N17.9 AKI G40.909 Seizu F23.0 Schiz
I need result :- F24.20 F50.89 F23.0

You need Array[String] Variable. You can save your data in this array.
To get the data from array you need then the following: ArrayName[0] to get the first item in the array, ArrayName[1] to get the second item etc.

we can use the same regex pattern:

Also have a look here:

@naim1000 - Please check this…

Hope this helps…

yes but my question is how can we show this result in a single Variable without using (0),(1),(3)

I have already showed you the write Line, You just have to assign it to variable as shown below…

1 Like

can you share me flow

Please give it a try based on the screenshot shared, it just two activities…

thank you

thank you done

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.