Simple query. I have tried multiline capture on regex101.com with below code, showing perfect result as I want but the same code isn't working in Alteryx.
^\s+:B2:(\n?.+\n?.+\n?.+\n?.+\n?).+\s+:RB:
I need everything between two identifiers :B2: to :RB: as present in the text input, parsing through a REGEX script. The number of content lines may vary from 2 to 5, that's used \n? as new lines may be optional, till :RB: is found, the trap should be stopped. below is the data, green being the content to be captured:
BANK LIMITED
Mackinnons Building SS Chundrigar
Road, CITY
:B2:
x0x0x0x0x0x0x0x0x0x0x0x0x0x0x
1* 2* 3* 4* 5* 6* JOHN SMITH
CAVALRY GROUND 52ND FLOOR, 39 COMMER
CIAL AREA 54600 CITY COUNTRY
:RB:SWIFT
:PD:8xxxxx159 NC-22/006/
:SRINF:/NATID/1172289-4/
/CONTINFO/92|MY@NIMBUS.DD/
:PPC:SUPP
:RGINF:/RESCNO/RTGS
E3M2xxxxxxxx471
SEQ-00001
Solved! Go to Solution.
Thanks for the reply .. but I can't concatenate whole of the data. Instead, I want to parse it using REGEX expression to have it better working with my full workflow. You know of any reason why /n is not responding in Alteryx, but responding on REGEX101.com. Thanks
Thanks for it. But Alteryx doesn't seem like reacting to \n ... any idea about it dear?
That won't also work for me. I do need the content in one cell ... but data in my single text file with similar structure may come around hundreds of times. I don't think concatenating everything at once would be fruitful while combining with my other regex expression parts.
@faran_ahmed your entire data is in the below format ?
BANK LIMITED
Mackinnons Building SS Chundrigar
Road, CITY
:B2:
x0x0x0x0x0x0x0x0x0x0x0x0x0x0x
1* 2* 3* 4* 5* 6* JOHN SMITH
CAVALRY GROUND 52ND FLOOR, 39 COMMER
CIAL AREA 54600 CITY COUNTRY
:RB:SWIFT
:PD:8xxxxx159 NC-22/006/
:SRINF:/NATID/1172289-4/
/CONTINFO/92|MY@NIMBUS.DD/
:PPC:SUPP
:RGINF:/RESCNO/RTGS
E3M2xxxxxxxx471
SEQ-00001
There would be so many different things ... but whenever :B2: would come in it, there will always be :RB: after 3-5 lines in exact format.
So this format will keep on repeating after every few hundreds of lines.
Hi @faran_ahmed, are you looking to achieve this?
If so then let me know I will explain the process along with the workflow.
Thanks!