Regex- find string

Hello All

Could you please help me with the below request

I am reading files and look for all occurances of a particular string for e.g. number starting with 546.
Sample content of the file

I need to extract only the values starting with 546 marked in bold below

N785MANIFEST Z DN. 2021-06-25, 9DK8WYKAZ ODBIORCÓW, Y022PLAEOF440000140123,
Y024PLAEOF440000140123, N741023-61070273, N703280700622014,280649304298,
N703280652120685,280652168793, N703280652277780,280652417920, N703280658708222,280695789551,
N703280699467017,280700033210, N703280708690660,280713683807, N703280718527520,280724144799,
N703280725126785,280739272420, N703280741069597,280741940710, N703510373240913,774061651618,
N703774073216663,774073336576, N703774073657734,774073951447, N703774073974492,774073987952,
N703774074066566,774074131174, N703774074142892,774074200248, N703774074274559,774074331700,
N703774074401880,774078107326, N703774085657922,774085695430, N703774085697525,774086038651,
N703774086615164,813640158445, N325PROF/23/06/2021, N380EKT/145/06/2021,54698095,54698096,
N38054698098,Z DN. 22/06/2021,125/2021, N380Z DN. 25/06/2021,166/6/2021/UK, N38054698161,Z DN.
23/06/2021, N325Z DN. 23/06/2021, N38078/2021,Z DN. 23/06/2021, N380Z DN. 23/06/2021,27/6/2021, N380Z
DN. 24/06/2021,Z DN. 24/06/2021, N380FSE-9/06/2021/EX,4012/2021, N380430032549, N32501/06/2021,Z DN.
23/06/2021, N3804027/2021,Z DN. 23/06/2021, N3804028/2021,4029/2021, N380Z DN. 23/06/2021,4030/2021,
N3804031/2021,Z DN. 24/06/2021, N380Z DN. 24/06/2021,Z DN. 23/06/2021, N380Z DN. 24/06/2021,Z DN.
24/06/2021, N380PL-INV0048510,2021/06/51, N380UK/11/06/2021,385/6/2021/GB, N380Z DN. 24/06/2021, Y903.,
Y901., Y935.

After extracting this 4 values, I need to write them in a file with each occurance as a seperate line

Many Thanks for your help!

@newbie3 - Please check this…

Refer this post on how to write the output from the matches activity…

1 Like

Thanks @prasath17. The youtube video was very helpful!