Taking from a different line

Hello, I want to extract matches 2, 3 and 4 alone. How do I do it, using one expression?


Singapore (SIN) T4 9 13:15 Kuala Lumpur (KUL) KLIA2AK 706 1 hours 5 minutes Flight 2 Fri, 24 Mar 2023 1 hours 10 minutes X 20: 45 Kuala Lumpur (KUL) KLIA2 9 21:55 Singapore (SIN)


Depart Singapore (SIN) 15:10 787 Singapore . Changi Airpont Termnal 1 November 2019 Check-in time : Frl. 08 NOv 2019 12:10 Arrive Amritsar (ATO) 18:45 Fare Class: W1 Amritsar . Amritsar International Termnal 08 November 2019 2 Return: Amritsar to Singapore Ry TR 509 ( Scoot 789-TRC = 5h45min Depart Amritsar (ATQ) 19:45 787 Amitsor * Amntsar Inemnabional Terminal Noverrber 2019 Check-in tme : Frt, 22 Nov 2019 16:45 Arrive Singapore (SIN)


rom Jakarta (CGK-Sockamo Inti) Terminal: 2F Depart Sat 29 Dec 2016 18:00 Status: Confirmed To: Singapore (SIN-Changl) Terminal: 3 Arrive: Sat, 29 Dec 2016 20:45 Stopovers: o No vald Basora: 20 Dee 16 Nal VaEd Altr 20 Dec 16 Baggage Allowance: 2 Pes SO 636 Operated by Singapore Aidines Economy Class (Q) From. Singapore (SIN-Changl IntQ Temminal: 3 Depart Sat 29 Des 2016 23:55 Stalus: Confirmed To: Tokyo (NAT-Narlla. Intl)

Hey @helpplease , If you use find matching patterns activity, and assign variable in Result of its properties panel it will give all Matches in a collection format.

Using Index you can get match 2, 3 and 4

@helpplease

Send the text I will help you with single Regex expression

Regards,

@helpplease

If you are talking about how to get the matches not only the first and remaining…then you can use the output of matches activity to get eqach like below

Matchesout(1).Value will give the second matched valueand the number can be increased to get each

If you want to leave only the first matches and get all the remaining into one variable then use matchesout.skip(1) this will leave first and give you all the other matches

Cheers

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