# Unicode Pattern

**URL:** <https://forum.getkirby.com/t/unicode-pattern/35046>\
**Category:** Questions\
**Tags:** v5\
**Created:** [December 3, 2025, 3:35pm UTC](https://forum.getkirby.com/t/unicode-pattern/35046 "2025-12-03T15:35:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tillcremer](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@tillcremer](https://forum.getkirby.com/u/tillcremer)\
**Post date:** [December 3, 2025, 3:35pm UTC](https://forum.getkirby.com/t/unicode-pattern/35046/1 "2025-12-03T15:35:09Z")

</div>

In a blueprint, I use a pattern to allow entries like these:

2021  
2021–2024  
2021–present  
2021/2025

`pattern: "^[0-9]{4}(–([0-9]{4}|[a-zA-ZäöüßÄÖÜ]+))?$"`

Currently, my pattern allows English and German characters only. I want it to allow all Unicode characters such as French et al. How can I achieve this?

---

<div class="post-metadata">

**Author:** ![tillcremer](https://avatars.discourse-cdn.com/v4/letter/t/65b543/32.png) [@tillcremer](https://forum.getkirby.com/u/tillcremer)\
**Post date:** [December 4, 2025, 3:15pm UTC](https://forum.getkirby.com/t/unicode-pattern/35046/2 "2025-12-04T15:15:24Z")

</div>

I wonder if `pattern:` or `match:` works better? What do you recommend to use for a text field?

`pattern: "/\b\d{4}(?:\/\d{4}|–\p{L}+|–\d{4})?\b/u"` or

```auto
validate:
  match: "/\b\d{4}(?:\/\d{4}|–\p{L}+|–\d{4})?\b/u"

```

I receive error messages on both. How does Kirby work with REGEX? What is the best practice?

This `pattern: "\b\d{4}(?:\/\d{4}|–[^\d\/]+|–\d{4})?\b"` works almost perfectly but some inputs are still questionable. I cannot write `1234–Äaa á` for instance but `1234–Äaa a`.

---

<div class="post-metadata">

**Author:** ![texnixe](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.getkirby.com/texnixe/32/5754_2.png) [@texnixe](https://forum.getkirby.com/u/texnixe)\
**Post date:** [December 4, 2025, 5:36pm UTC](https://forum.getkirby.com/t/unicode-pattern/35046/4 "2025-12-04T17:36:38Z")

</div>

Syntax is either:

```auto
text1:
  type: text
  width: 1/2
  pattern: '[0-9]'

```

or:

```auto
text2:
  type: text
  width: 1/2
  validate:
    match: '/[0-9]/'

```
