My Oracle Support Banner

How To Filter Chinese/Japanese Characters Using Regex In Groovy (Doc ID 2714526.1)

Last updated on DECEMBER 22, 2020

Applies to:

Oracle Fusion B2B Service Cloud Service - Version 11.13.20.07.0 and later
Information in this document applies to any platform.

Goal

Tried using regex to filter the Chinese and Japanese character, we arrived at the following expression:

Japanese regex = /^[\u3000-\u303F]|[\u3041-\u309F]|[\u30A0-\u30FF]|[\uFF00-\uFFEF]|[\u4E00-\u9FAF]|[\u2605-\u2606]|[\u2190-\u2195]|\u203B*$/;
Chinese regex = /^[\u2E80-\u2FD5\u3190-\u319f\u3400-\u4DBF\u4E00-\u9FCC\uF900-\uFAAD]*$/;

However, none of them seem to be working. We have used the following Japanese and Chinese characters.
Please help in building regex to achieve this requirement.
 

Solution

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Goal
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.