How Does Regex Replacement Work for Postal Codes in Novulo?

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.

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.

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.

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

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 and in a Novulo application using Settings → Regex-transformation. Both give the same result.
In Novulo:


Hope this helps

2 Likes