Need data that are present in a sentence which are available in parentheses

Hi All,

I am struggling in getting values in a sentence…please help me in finding out…

Input : UiPath is (RPA tool) And (used for large scale end to end automation) And it provides( solution for businesses)

Output :(RPA tool)
(used for large scale end to end automation)
(solution for businesses)

Thanks in advance…

@Bhanu123
Welcome to the forum

we can use Regex

Assign Activity:
arrValues | DataType: String Array =
Regex.Matches(strText, "\([\s\S]+?\)").Cast(Of Match).Select(Function (m) m.Value).toArray

grafik

Do not miss to import:
grafik

[CheatSheet] - System.Text.RegularExpressions | RegEx - News / Tutorials - UiPath Community Forum

Hi @Bhanu123 , Below regex will also extract the required data

(\().*?(\))

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