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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Automate
Answered

Parse text

(0) ShareShare
ReportReport
Posted on 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?

I have the same question (0)
  • VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at

    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

  • Lars5 Profile Picture
    38 on at

    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,656 Super User 2025 Season 2 on at

    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 at

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

  • VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at

    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 at

    Thanks

     

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

  • VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at

    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 at

    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

     

  • Verified answer
    VishnuReddy1997 Profile Picture
    2,656 Super User 2025 Season 2 on at

    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 at

    Hi Vishu

     

    the solution was this

     

    Lars5_0-1713962107273.png

     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 503 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 321 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard