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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Adding two or more dif...
Power Automate
Unanswered

Adding two or more different numbers OCR to detect

(0) ShareShare
ReportReport
Posted on by 6

I wanna detect any number between 90-120 but ı cant write it to OCR when ı try to write like 90-91... OCR is not looking for 90 and 91 it is looking for exactly 90-91 how can ı do it please help

I have the same question (0)
  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    The find value is a text value, so, even if it was a list of numbers, you would have to loop through the list, forcing it to read OCR each time.  To make this faster, let's reduce the number of times we may have to use OCR to 2.

     

    "Extract Text using OCR", use "Recognize entities in text: Entity Type: Number" and then compare the number to your range.  If found, then have the "Find" equal the number found in Recognize Entities.

    Good luck!

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    I assume you are doing this via the Move mouse to text on screen (OCR) action or the Wait for text on screen (OCR) action. In either case, there is a toggle called "Is regular expression". If you enable that, you can use regular expressions in the "Text to find" action. The following regular expression will match any number between 90 and 120:

    (9[0-9])|(1[0-1][0-9])|120

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • monaresta0 Profile Picture
    6 on at

    thank u for your reply in my flow i use if text is on the screen (OCR) so if i toggle regular expression button on and copy write this (9[0-9])|(1[0-1][0-9])|120 for text to find will it search for numbers between 90-120? and i have one more question is it possible to use spesific charachters like + in the text like if its 120 i dont want ocr to find it if its +120 i want so is it possible? 

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Yes, the expression has some OR operators, as that is the best way to cover the range.

    9[0-9] covers 90-99, 1[0-1][0-9] covers 100-119 and then there's 120 separately.

     

    If you want to exclude cases when it's +120, you need to add a negative lookbehind to it. Use this as the regex instead:

    (9[0-9])|(1[0-1][0-9])|((?<!\+)120)

    It follows the same pattern, but only includes 120 if it doesn't follow a +.

    -------------------------------------------------------------------------
    If I have answered your question, please mark it as the preferred solution. If you like my response, please give it a Thumbs Up.

    I also provide paid consultancy and development services using Power Automate. If you're interested, DM me and we can discuss it.

  • monaresta0 Profile Picture
    6 on at

    thank u ı am writing exactly (9[0-9])|(1[0-1][0-9])|((?<!\+)120)

     

     this and i added a sound affect when it detects any number from my range following + symbol and when i run my flow it detects something while my numbers is not on the screen 

  • monaresta0 Profile Picture
    6 on at

    monaresta0_0-1701196457377.png

     

  • Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    Can you share what the screen looks like when it finds it?

    I would also suggest using Extract text with OCR using the same settings, to see what it extracts, so you can review the actual results of the OCR search and see if there is something being misinterpreted.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
David_MA Profile Picture

David_MA 276 Super User 2026 Season 1

#2
11manish Profile Picture

11manish 169

#3
Haque Profile Picture

Haque 154

Last 30 days Overall leaderboard