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 Platform Community / Forums / Power Automate / Flow condition - event...
Power Automate
Answered

Flow condition - event subject contains any 7 digit number (i.e. any 7 consecutive numbers)

(2) ShareShare
ReportReport
Posted on by 38

Hey there,

I am trying to create a condition in a flow (or alternatively a parameter in the 'event approaching' trigger) that checks to see if the event subject contains any 7-digit number.

Example:

I have 2 upcoming events which will be identified by the flow:

1. Meeting with John SMITH - 1234567

2. Conference call with Mary - Add Steph

I want to add a condition that checks whether the event subject have a 7-digit number in them and if they do, returns TRUE (and if not, returns false)

The number will always be 7 digits however it can any combination of 7 digits and won't always be in the same position. For example I want the same condition to return true for all of the following event subjects:

3. Joe - 7935816 - ball back

4. (3665200) - Purchase orders due

BUT NOT for :

6. SMITH - 1245 - Event

Does anyone know how to do this? I have tried using multiple variations of the expression [0-9]{7} but have had zero luck.

any assistance would be most appreciated !

Categories:
I have the same question (0)
  • Suggested answer
    Nived_Nambiar Profile Picture
    18,129 Super User 2025 Season 2 on at
    Hi,
     
    Regex is not directly supported in Power Automate, if you want to use regex, you can try same in office script and run the script via power automate cloud flow, refer below for getting idea around this
     
     
    Or you can try with some custom connectors as well - https://learn.microsoft.com/en-us/connectors/regexmatchingip/
     
    There are some other connectors i know but they are paid ones.
     
     
    Also if you can confirm the following so that i can check whether string functions can help in check whether the 7 digit number is present in subject or not
     
    • Does the subject would have - as delimiter b/w some characters?
    • for a subject pattern like (3665200) - Purchase orders due  , can we confirm that non-number characters like brackets will only appear around the 7 digit number ?
     
     
    Thanks & Regards,
    Nived N 
    LinkedIn: Nived N's LinkedIn
    YouTube: Nived N's YouTube Channel
    Blog: Nived Nambiar's Blogs
     Found my answer helpful? Please consider marking it as the solution!
     Your appreciation keeps me motivated. Thank you!

     
  • Suggested answer
    Michael E. Gernaey Profile Picture
    53,369 Super User 2025 Season 2 on at
    Hi,
     
    What you can do is split the string by ' ' aka a space
    Then use apply to each to check
    with a Condition inside that checks the following
    1) IsNumeric(CurrentItem)
    2) is the length of the Text(Number) = 7
     
    Then in the yes side do what you want.

    You may need to also Trim to get rid of any extra spaces.

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 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard