My automation uses a regex pattern to extract a part of larger piece of text. Such as:
U123456 West Dunbartonshire Council Ladyton Nursery, Ladyton, Bonhill, Alexandria, West Dunbartonshire, United Kingdom G83 9DZ
U789012 Glasgow City Council St Mungo’s Primary, 45 Parson Street, Glasgow, United Kingdom G4 0PX
U345678 The City Of Edinburgh Council Boroughmuir High School, 111 Viewforth, Edinburgh, United Kingdom EH10 4LR
Now, using the UiPath.Core.Activities.Matches Activity, i ran the following regex to capture the first line of the address for my comparison.
However when running, the output IEnumerable Produced the output include the word Council, the whitespace, adn the comma. None of which are in the capturing group.
I have tried naming the capture group(and making the other elements in the pattern non-capturing groups) as well as using the Regex Option to ExplicitCapture to try to narrow down what is being requested, but to no avail.
The Matches Activity is always outputting the full match as oppose to what I specifically want to capture.
Could anyone assist and let me know if it is at all possible to output just the required string.
For Example, in each of the example I have provided, I wish for the Outputs:
- Ladyton Nursery
- St Mungo’s Primary
- Boroughmuir High School