Support for Unicode Property Escapes

Use case or problem

Using regex to search for word characters, which are non-english characters, but still are considered word characters in our various languages.

Like for me using Norwegian, it’s cumbersome to search for the range [a-zæøåA-ZÆØÅ] to get all our characters. And if you live in a country which uses accents and umlauts and …, it gets even worse, as you would need to add stuff like, äëïüöàèìùòíáíéóúç, into the mix.

Luckily in more recent javascript-engines, these cases can be handled with the Unicode Property Escapes, and one could write \p{L} to get all word-characters in most(/any?) language. For more on the subject, see Unicode property escapes - JavaScript | MDN

Proposed solution

Either add full support all the time for these, or at least add the possibility to add the u flag to the regex so that one can use them in regex searches within Obsidian.

Current workaround (optional)

Current workaround is as explained above to either add the various characters into the mix, or do partial searches for parts of the words, which are not really a workaround, but just a kludge to doing the actual search you want to do.

1 Like