web
You’re offline. This is a read only version of the page.
close
Skip to main content
Community site session details

Community site session details

Session Id : rYgwv6LghyXvDQqj58ST+/
Power Automate - Power Automate Desktop
Answered

Parse text

Like (0) ShareShare
ReportReport
Posted on 24 Apr 2024 10:34:45 by 38

I want and search for a text in a text. But it should not matter if it is written in upper or lower case letters

How do I do it?

  • Lars5 Profile Picture
    38 on 24 Apr 2024 at 12:35:00
    Re: Parse text

    Hi Vishu

     

    the solution was this

     

    Lars5_0-1713962107273.png

     

  • Verified answer
    VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 24 Apr 2024 at 12:02:34
    Re: Parse text

    Hi @Lars5 ,

     

    The First Solution is working for me. Please find the another solution.

    VishnuReddy1997_0-1713960059943.png

    Code:

     

    File.ReadTextFromFile.ReadText File: $'''C:\\Users\\OneDrive \\Desktop\\Input.txt''' Encoding: File.TextFileEncoding.UTF8 Content=> FileContents
    Text.ParseText.RegexParseForFirstOccurrence Text: FileContents TextToFind: $'''KONTOUDTOG''' StartingPosition: 0 IgnoreCase: True OccurrencePosition=> Position Match=> Match
    IF IsNotEmpty(Match) THEN
     IF Contains(Match, $'''KONTOUDTOG''', True) THEN
     Display.ShowMessageDialog.ShowMessage Message: $'''Yes''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed7
     END
    END

     

    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Vishnu Reddy

  • Lars5 Profile Picture
    38 on 24 Apr 2024 at 11:49:27
    Re: Parse text

    Hi again

     

    My variabel include this:

    *********************************************

    Kassekladde AccpScan
    VS:
    Snooze 01/02/1900
    1 uge
    3 dage
    1 dag
    Bilagstype
    Kreditorfaktura
    CVR nr 43869205
    Dato 01.12.2023 01/12/2023
    Kreditor
    43869205 - Greens Engros ApS
    Ă—
    Modkonto
    1310 - Varekøb
    Ă—
    I25
    Ă—
    Beløb
    254.696,69 DKK
    Tekst KONTOUDTOG - Greens Engros ApS
    Greens Engros ApS 96%
    Betaling og faktura
    Fakturanr 477997
    Betalingstype
    Ă—
    Forfaldsdato 31.12.2023 31/12/2023
    Nytårsaften - Søndag
    Vælg næste bankdag
    Overfør nu [CTRL+A]

    *********************************************

    But the code don't find "Kontoudtog"

     

    Lars5_0-1713959360186.png

     

  • VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 24 Apr 2024 at 11:33:06
    Re: Parse text

    Hi @Lars5 ,

     

    Yes it will work even if everything in lower case also.

    Please mark is as solution.

     

     

     

    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Vishnu Reddy

  • Lars5 Profile Picture
    38 on 24 Apr 2024 at 11:22:50
    Re: Parse text

    Thanks

     

    And the exembel vill also work if the text(Kontoudtog) is writet with small letter

  • VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 24 Apr 2024 at 11:14:11
    Re: Parse text

    Hi @Lars5 ,

     

    Please find the solution. To store the text in variable I am reading text from the Text file.

    VishnuReddy1997_0-1713957067759.png

    NOTE: PLEASE ENABLE IGNORE CASE in If condition as shown in below image.

    VishnuReddy1997_1-1713957098283.png

    Code:

    File.ReadTextFromFile.ReadText File: $'''C:\\Users\\OneDrive\\Desktop\\Input.txt''' Encoding: File.TextFileEncoding.UTF8 Content=> FileContents
    IF Contains(FileContents, $'''KONTOUDTOG''', True) THEN
     Display.ShowMessageDialog.ShowMessage Message: $'''Yes''' Icon: Display.Icon.None Buttons: Display.Buttons.OK DefaultButton: Display.DefaultButton.Button1 IsTopMost: False ButtonPressed=> ButtonPressed7
    END

     

    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Vishnu Reddy

     

  • Lars5 Profile Picture
    38 on 24 Apr 2024 at 10:59:59
    Re: Parse text

    I already have the text in a variabel. So I shall only check about the varibel contains that word

  • VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 24 Apr 2024 at 10:55:49
    Re: Parse text

    Hi @Lars5 ,

     

    Do you means your text file contains these words or pdf file.

    In which type of file does this text(Kontoudtog) Contains (PDF,Word,Text).

     

    Regards,

    Vishnu Reddy

  • Lars5 Profile Picture
    38 on 24 Apr 2024 at 10:54:02
    Re: Parse text

    Thanks

     

    I wanted to check if a text contains the following words no matter how it is written.

    KONTOUDTOG

    Kontoudtog

    kontoudtog

    KontoUdtog

  • VishnuReddy1997 Profile Picture
    2,524 Super User 2025 Season 2 on 24 Apr 2024 at 10:49:07
    Re: Parse text

    Hi @Lars5 ,

     

    Use can use regex in Parse text action as shown in below image.

    VishnuReddy1997_0-1713955705461.png

     

    If you could share your text file we can help you more.

     

    (Note:- if you got your solution you can mark as solution and gives kudos)

     

    Thanks & Regards

    Vishnu Reddy

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 2

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 2

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 2