@Pablo_Sanchez
With the help of Regex we can split the string
refering to the groups (we will trim later)

For regex learning have a look here:
With following flow we can achieve the result:
The main idea is about:
-
use regex to as mentioned above
Regex.Matches(strText, strPattern, RegexOptions.IgnoreCase)
-
group the matches and create JProperties, return all as an array
(From m In myMatches.Cast(Of Match).toList
Group m By k=m.Groups(1).Value.Trim Into grp = Group
Let arrVal = grp.Select(Function (a) a.Groups(2).Value.Trim).toArray
Let ja = JArray.FromObject(arrVal)
Select p = New JProperty(k, ja)).toarray
- Create the JObject from the returned JProperty Array
new JObject(arrProps)
We had used LINQ:
But can also decompose the LINQ part to essential activities
Find starter help here:
ppr_RegexBox_PabloSanchez.xaml (7.0 KB)