Forum Discussion

Raj48's avatar
Raj48
New Contributor
4 years ago

Search for particular content in Text File

Hi,   This is regarding content search in Text File.    I have a Daily Settlement Text file which has previous day transactions (approx 100 lines with transaction date and type). Is there any bet...
  • Marsha_R's avatar
    4 years ago

    You could probably use a regular expression.  What I did in a similar case was to shove the text into a string variable and then search the string for the substring that I wanted.

     

    So in your example I might first look for the substring Transaction Type: TXN2 Date and Time: 12-May-2021 and then search for the amount that immediately follows it by looking for the $.  Then you can verify the amount.