Find String

Hi Team,

I have few Address lines like below

Sun Star Moon
Intro Download UiConnect
Academy Go DC123

I wanted to find the word DC and wanted to read the remaining 3 digits.
My outout should be DC123, and this DC should be in any line 1st, 2nd, 3rd or even 5th line.

@Robotics

Try below Regular expression.

 ( ?= DC).+

You can test it in below site.

You can use Regex in assign activity.
OutputVar=system.Text.RegularExpressions.Regex.Match(Input_Str,"(DC)(. )(\d )").Groups(2).value.TrimRegex.xaml (4.4 KB)

I am getting a blank message as output. This is the exact input i am trying
QBTI VILJ- 36/3/74 DC99 76

assume the above input in any 1-5 lines in am using for loop which reads line by line.
I am adding your code like below
OutputVar=system.Text.RegularExpressions.Regex.Match(item.toString,"(DC)(. )(\d )").Groups(2).value.Trim

Let me know anything needs to be changed

Copy the syntax from attahed xaml.

Regex_Fullmatch.xaml (4.4 KB)

Thanks anand your code works

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