Get specified text from String

Yes i tried the above expression. There is no error but Output is blank.

Re-sharing Input
SQL>
COUNT
0000

SQL> SQL>
DB SUM(AMOUNT)


D 0000000.00
C 0000000.00

Card-TechOps-Debit BOS-T1

Gokul in your RegexMultiple.xml can you pls try to save the output of the message box ?
In your xml file the input is correct

In my environment it is working @prerna.gupta

RegexMulitple.xaml (6.3 KB)

image

Regards
Gokul

Find this attachment:

Regex.zip (1.8 KB)

Not sure why in my environment its a problem.
Im using 22.4.3 ver of Studio.
Can you confirm your Studio ver pls ?

I have 2022.10.3 version of the studio. @prerna.gupta

But its also working in 22.4.3 version also for my

Can you share the XAML file with us?

I am using Get Text activity to fetch the Input value from an application.
Out of Get Text activity is as below -

@"SQL>
COUNT
0000

SQL> SQL>
DB SUM(AMOUNT)


D 0000000.00
C 0000000.00

Card-TechOps-Debit BOS-T1
"

Is @ and " " in Input seems a problem ?

Can you pls try same code with Input as below :

@"SQL>
COUNT
0000

SQL> SQL>
DB SUM(AMOUNT)


D 0000000.00
C 0000000.00

Card-TechOps-Debit BOS-T1
"

I checked attached Regex.xml as well.
Seems like Input text (extracted using Get Text activity) is problem.

Can you pls try with Input as below :

@"SQL>
COUNT
0000

SQL> SQL>
DB SUM(AMOUNT)


D 0000000.00
C 0000000.00

Card-TechOps-Debit BOS-T1
"

image

Did you changed the Input in this one ?

Do you get all the values empty? @prerna.gupta

update the regex pattern to :“((((?<=COUNT\s\n)\d.+))|(((?<=D\s?)\d.+)|((?<=C\s?)\d.+)))”

Regex.xaml (10.3 KB)

HI @prerna.gupta

Check out the XAML file

RegexMulitple.xaml (6.7 KB)

image

Regards
Gokul

In this xml file the input has been modified completely.
How can we remove symbol (“@”) and Comma (") from any Input string ?

I’ll try to modify the Get Text activity Input (similar to your input) so that your previous xml code can be worked upon.

Have you tried to do that. @prerna.gupta it will work Check it.

image

I already tried its not working for me as Input seems modified.

@Tapan_Behera1
For me get Collections consists only 1 item ie Count.
There a difference between your and my Input string.
Can you pls check the difference below and suggest :

Your Input
@"SQL>
COUNT
0000

SQL> SQL>
DB SUM(AMOUNT)

D 0000000.01
C 0000000.02

Card-TechOps-Debit BOS-T1
"

Get Text Input
@"SQL>
COUNT
0000

SQL> SQL>
DB SUM(AMOUNT)


D 0000000.00
C 0000000.00

Card-TechOps-Debit BOS-T1
"

Both are same. Did you check with latest regex pattern that i sent? I have also attached the workflow…kindly check

Yes i did checked the xml file.
When im trying to run the xml file with above Input then GetCollections consists of only 1 item.

And only difference i could spot is different Input