Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
rajni_batra
Specialist
Specialist

Read Particular text from Unix Log

Hi All,

I have a log from which i need to extract Booking ID (Identification is 8-20 character string starting with RAJ is my booking ID)

highlighed as BOLD below .

But the problem is email ID also starts with RAJ and i am getting wrog output. started many ways.

and many other cases i have.

LOAD Log, Replace(Log,TextBetween(Log,'<','>'),'*') Inline

[

Log

<rajnibat@gmail.com>Unix Timestamp<XYZ@yahoo.com>RAJ12345<.....@rediff.com>

<abc@gmail.com>Unix Timestamp<XYZ@yahoo.com>RAJ14567<.....@rediff.com>

];

Please Help here!!!

Thanks,

Rajni

5 Replies
Anil_Babu_Samineni

Rajni,

Can you please show me the sample o/p

If possible try to use wildmatch and then try ...

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Kushal_Chawda

Please share few sample records with output needed?

ashishkalia
Partner - Creator
Partner - Creator

Hi

Just paste the below logic

=Subfield(subfield('<rajnibat@gmail.com>Unix Timestamp<XYZ@yahoo.com>RAJ12345<.....@rediff.com>','>',3),'<',1)

highlight in bold is your string, if it is in any field then put your field name here and your done.

cheers....

marcus_sommer

Maybe something like this:

LOAD Log, 'RAJ' & TextBetween(Log,'>RAJ','<') as [Booking ID] Inline

[

Log

<rajnibat@gmail.com>Unix Timestamp<XYZ@yahoo.com>RAJ12345<.....@rediff.com>

<abc@gmail.com>Unix Timestamp<XYZ@yahoo.com>RAJ14567<.....@rediff.com>

];

- Marcus

tamilarasu
Champion
Champion

Hi Rajni,

Try this,

LOAD Log, Textbetween( Subfield(Log,'Timestamp<',2), '>','<') as [Booking ID] Inline

[

Log

<rajnibat@gmail.com>Unix Timestamp<XYZ@yahoo.com>RAJ12345<.....@rediff.com>

<abc@gmail.com>Unix Timestamp<XYZ@yahoo.com>RAJ14567<.....@rediff.com>

];


Capture.PNG