# How Does Regex Replacement Work for Postal Codes in Novulo?

**URL:** <https://community.novulo.com/t/how-does-regex-replacement-work-for-postal-codes-in-novulo/696>\
**Category:** \[Q&A\] General\
**Created:** [April 8, 2025, 7:33am UTC](https://community.novulo.com/t/how-does-regex-replacement-work-for-postal-codes-in-novulo/696 "2025-04-08T07:33:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![StephanRS](https://yyz2.discourse-cdn.com/flex008/user_avatar/community.novulo.com/stephanrs/32/92_2.png) [@StephanRS](https://community.novulo.com/u/StephanRS)\
**Post date:** [April 8, 2025, 7:33am UTC](https://community.novulo.com/t/how-does-regex-replacement-work-for-postal-codes-in-novulo/696/1 "2025-04-08T07:33:01Z")

</div>

Hi everyone,

I’m trying to enforce a specific Dutch postal code format via **Settings → Countries → Netherlands**. I’ve enabled the **Postal Code Format grid (M3019)** and checked the **Enforce Postal Code Format** option.

My goal is to match Dutch postal codes using a regex that captures:

- Four digits (not starting with 0)
- Followed by two letters
- With an optional space in between

For example, both `1234AB` and `1234 AB` should be valid input, but I wish that Novulo to always **display** it as `1234 AB`. So I’ve also filled in the **Replacement** field.

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/b/b1a914f25e93ed16a43e19dc7698089046a639bf.png)

However, when I test this via the API or in Novulo itself, I don’t see the formatted result — only the raw string I entered as the replacement pattern.

 ![image](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/6/60833f0b757f690a609e23475cd97102db6de303.png)

Could someone please explain how Regex enforcement and replacement work in Novulo, specifically for postal code formatting? Is there something I might be missing?

Thank you in advance.

---

<div class="post-metadata">

**Author:** ![k.molokova](https://avatars.discourse-cdn.com/v4/letter/k/34f0e0/32.png) [@k.molokova](https://community.novulo.com/u/k.molokova)\
**Post date:** [April 11, 2025, 7:40am UTC](https://community.novulo.com/t/how-does-regex-replacement-work-for-postal-codes-in-novulo/696/2 "2025-04-11T07:40:15Z")

</div>

@StephanRS, good morning and sorry for the late response, we are looking into it.

---

<div class="post-metadata">

**Author:** ![Stefan](https://avatars.discourse-cdn.com/v4/letter/s/bbce88/32.png) [@Stefan](https://community.novulo.com/u/Stefan)\
**Post date:** [April 11, 2025, 8:40am UTC](https://community.novulo.com/t/how-does-regex-replacement-work-for-postal-codes-in-novulo/696/3 "2025-04-11T08:40:44Z")

</div>

Hello Stephan,

If you use Pattern: \b(\d{4})\s\*([A-Za-z]{2})\b and Replacement: $1 $2 it should return format ‘1234 AB’. When input is lowercase, it does not force upper case. I don’t think it is supported in the plugin used, as C# does not seem to support this.

Tested this in [regexr.com](http://regexr.com) and in a Novulo application using Settings → Regex-transformation. Both give the same result.  
In Novulo:

 ![afbeelding](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/0/0d6b14bee0f95b6d16829fde0ce7e2840c4a6708.png)  
 ![afbeelding](https://canada1.discourse-cdn.com/flex008/uploads/novulo/original/2X/b/b8811317acfa8928bd503640c159b8fe927ca803.png)

Hope this helps
