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 / Trying to Exclude Zip ...
Power Automate
Answered

Trying to Exclude Zip Code from Address String with Reg ex

(0) ShareShare
ReportReport
Posted on by 431

Trying to exclude zips of the form ##### or #####-####

 am not getting an error but I am not getting a match result

The string is of the form: 111 SomeStreet 33124

I tested the regex Im using in a regex test site and it didn't work. The regex Im using: 

^.*(?<!\d{5}(-\d{4})?)$

 

 

Steve48_0-1696347584618.png

 

I have the same question (0)
  • CU31080729-3 Profile Picture
    502 Moderator on at

    Hi

    111 SomeStreet 33124 this text to parse right ? and what output you need ?

    have tried or test your regular expression on regex website , can it work there.

     

    thanks

    chetan ninghot

  • Verified answer
    Agnius Bartninkas Profile Picture
    Most Valuable Professional on at

    If you want to exclude something from a text, a better way to do it is to use Replace text with regex on the input and replace the pattern with an empty string. If you want to exclude a zip code, use \d{5}(-\d{4})?  and replace it with %""% (which represents an empty string in PAD).

    -------------------------------------------------------------------------
    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.

  • Steve48 Profile Picture
    431 on at

    Simple and elegant. I didnt realize I could use a regexin the text to find field

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 Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Valantis Profile Picture

Valantis 411

#2
David_MA Profile Picture

David_MA 300 Super User 2026 Season 1

#3
Vish WR Profile Picture

Vish WR 291

Last 30 days Overall leaderboard