Need Regex for below data

Hi Want to extract data from patient number

Patient Balance
Number Number
5384 4736.5
874654
add
add data from others
Patient Balance
Number Number
664 7.6
4646 556.6

Hi @Vivek_Kumar4 ,

If the pattern is always the same, then Check the below Regex :

(?<=Patient.*\nNumber.*\n)\d+

Let us know if this doesn’t work

Hi @Vivek_Kumar4

Can you the text with the format ?

Regards
Sudharsan

Hi
its working but getting only one patient number
patient number like one data or more than one data

i need to extract all patient number
it can be one or more than one like -
patient number
746
4734
patient number
486496
433346
453454
patient number
87443

@supermanPunch thanks
Please check above data

@Vivek_Kumar4 ,
Could you also help us by providing what is the Output/numbers that you want to retrieve from the Input data samples provided.

This will help us to conclude the output set. Also, if there are other formats of the data, do provide it so we could work on a common approach for extraction.

output-
Patient
Number
746
4734
486496
433346
453454

all patient number in one column

NEW DATA.txt (1.1 KB)

above are input data

we need all patient account number in one column

@supermanPunch Hi
Please help me

HI please check below attached data and help me

@Vivek_Kumar4 ,

Check with the below Regex Expression :

(\d+)\s+.*?(\d{2}\/\d{2}\/\d{2})\s+(\d{2}\/\d{2}\/\d{2})\s+([\d.,]+)\s+([\d.,]+)

You would need to use Matches Activity and get the Collection of matched values.
Next, you could capture the First group from the resulting matches and get all the patient numbers.

Output :
image

Workflow :
Extract_PatientNumbers.xaml (5.4 KB)

However, we see a difference in the Input data submitted at first, second than with the Last text file. Be sure to provide the required details, so that we can help/provide an appropriate solution.

1 Like

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