Get specified text from String

image
@Tapan_Behera1 Yellow highlighted line is add on
Refer snapshot

can you send me the exact text. in a text file

New Text Document.txt (128 Bytes)
PFA Input Text File

@prerna.gupta update the regex pattern to: ((?<=D\s).)|((?<=C\s).)|((?<=COUNT\s\n)\d.*)*

@Tapan_Behera1 ,
On changing the expression value of GetCollections is nothing.
PFA snapshot of Output

Regex.xaml (10.2 KB)
New Text Document.txt (131 Bytes)

Thanks so much @Tapan_Behera1 , this works for me.

There is one more Input sample (refer attached Next text Document.txt)
Can you pls help me with Regex this as well ?
New Text Document.txt (131 Bytes)

image

Using the above pattern Output is Incorrect.
pls refer attached snapshot

Sorry use this pattern:
((?<=D\s)\d.)|((?<=C\s)\d.)|((?<=-\s+)\d.)

Put it in the same code and test

Using the above pattern only 1 value is fetched and that is also Incorrect.
Refer attached snapshot:

image

@prerna.gupta Check this

Regex.xaml (10.2 KB)
New Text Document.txt (134 Bytes)

Thanks much.
Can we save value of each item to different variables as well ?
Eg str_one = item(0), str_two = item(1) etc
Because GetCollection and item datatypes are difficult to retrive

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