Extract text from string inbetween ( ) (Multiple substracts)

Hi there,

I am trying to extract specific text inbetween ( ) from a string with text.

Example of text:
Tab Page

The SA (551503809755) cannot be stopped on 2019‑07‑23, which is before its start date (2019‑07‑24)

So far I have done this with multiple assigns and substring with specific numbers for substract. But I would like it to be as dynamic as possible, and substracting all text/numbers between ( )

Any tips ideas?

Hi @JDK

Use matches activities

and give the regularexpression as (\d+)

Thanks
Ashwin S

Thanks for the fast reply, @AshwinS2
I have never tried Matches before. Could you show me how to setup from picture? :slight_smile:

1 Like


Error code: System.Linq.Enumerable+d__97`1[System.Text.RegularExpressions.Match]

In Matches activity you have Input property, this is where you put your whole string, then Pattern property, this is where you put your Pattern (in double quotes) and you can use CTRL+K to create RegexResult in Result property.

After that you can use RegexResult(0).Value (where 0 is first match, 1 is second match etc…) to get the desired result

Hi @JDK,
Use like this, its working…Capture1

And check this the pattern condition is wrong…before…


Cheers…
Vashisht.

1 Like

Thank you so much for the explanation - its working for me aswell now :slight_smile:

If you find it useful mark it as solution and close the thread bro…:grinning:
If any issues ping me…
Cheers…
Vashisht.

1 Like

Thank you very much :slight_smile:

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