Extract data using regex

Line 1 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR
YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR
Line 2 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR
YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR
Line 3 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR
YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR
Line 4 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR
YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR
Line 5 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR
YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR
Line 6 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR
YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR

this is data I want only bold heightened data,

@ashishmani - Please try as shown below…

(?<=Line 1 - 109 - )[\s\S]+(?=\r?\nLine 2) 

Regex Pattern Link

full text is save on DenialDisc variable how to aplly on this variable

I didn’t get you…

image

image

@ashishmani - Please use the Copy icon image to copy the code and paste it in the pattern…

Mine is working fine…

image

image

still have same result

@ashishmani - Please copy paste the text as is from the input string here…Looks like your text is continuous , not the like the one you posted above…Because I can see the Line 2 prints in the same line as Line 1…

i use get text , to extract data from web, then save in a variable, after that use your method to get perfect data.

can you use assign activity , and use same variable with regex

it’s all same @ashishmani – Whatever the input text you have provided is working fine for me …if its not working for you then your input string prints differently than you posted above…so please use a write Line to print the DenialDisc variable and provide it here…

can you send xmal to me

Here you go: Main.xaml (7.1 KB)

still get empty as a result,
but when i direct pass thw whole sentence then get a perfect solution.

Not sure… As I mentioned already, looks like your input string is little different when it prints that’s why its not working…So please write the output to text file and share the text file …or please use the debugging the tools to find out what’s going on…

@prasath17 i find the issue, can u tell me the solution

image

image

when I use get text activity to extract data from web, then thier is no space between any line,
see picture 1.
but when i copy the text thier are space in every line.
can you tell the solution of first pic.

Line 1 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR Line 2 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR Line 3 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR Line 4 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR Line 5 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOR YOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR Line 6 - 109 - CLAIM/SERVICE NOT COVERED BY THIS PAYER/CONTRACTOYOU MUST SEND THE CLAIM/SERVICE TO THE CORRECT PAYER/CONTRACTOR

basically this is real senario

I just added ? after n…and it captured above text(which you recently posted(Real scenario)…so try this…

(?<=Line 1 - 109 - )[\s\S]+(?=\r?\n?Line 2)