Skip to main content
Question

Text file extraction

  • February 8, 2022
  • 2 replies
  • 215 views

Hi Team

I need to extract few specific information from text files. The required field includes some Arabic words and numeric values. i tried to read csv/txt file with delimit with newline (The filed line numbers are not constant for each files), and export into a data table and I have use the string action as well (find, substring). But I'm not able to extract the specific content. any option to read selected specific fields from this text (Arabic).

2 replies

Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3276 replies
  • February 8, 2022

Hi @Nikhil K J​ ,

 

I hope you find this helpful

 

Please follow the below steps,

 

  • Use CSV/TXT Package to read the text file line by line
  • Include the If conditions to check the Arabic keywords
  • Whenever conditions find the keywords, please stored that line into the variable.
  • use the before/after or substring to get the value

 

 

 

https://khuloodnasher.medium.com/%D9%8D%D9%8Dsearching-arabic-texts-by-python-regular-expressions-2a1beb35461f/p>

 

ASCII and Arabic - Regex Tester/Debugger

regex for arabic and english letters with space Code Example

 

Thanks!


Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • February 9, 2022

Hi @Nikhil K J​ ,

 

Would you be so kind as to provide few sample text files so that we may be in a better position to assist you?

 

If there are only a handful of strings you will to export from it, then you could achieve some of it using Regex, but I can't say for sure unless we have something to work with.

 

Kind Regards,

Ashwin A.K


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings