PDF file which has the following when using GET TEXT

@ashokkarale

This is for booking flight tickets:

The data comes as follows"

from DELHI (DEL) to Hyderabad (HYD)

All I need is dynamic thing so I can extract the To Location only and please guide what to use Text left to right or modify text and please guide how.

Thanks

Note: This should work for multiple PDF’s having different From and To locations

Hi, @Rajat2

Use Read PDF Text to get the content, then apply the Text to Right activity with the separator "to " to extract everything after it. Finally, use string functions like Split or Regex to isolate and retrieve only the dynamic “To Location” from that extracted text.

Hi @Rajat2

Try to use regex activity with pattern to\s+([A-Za-z\s]+)\s+( and get Matches(0).Groups(1).Value to extract the To location dynamically and change accordingly.

Happy Automation

@Rajat2,

Use Find Matching Patterns activity.

Set Pattern property to :

/(?<=to\s)(.*?)(?=\s\()/gm

Text to search in property to your string to search: from DELHI (DEL) to Hyderabad (HYD)