cancel
Showing results for 
Search instead for 
Did you mean: 

Regular Expressions to allow some special characters

former_member192766
Participant
0 Kudos

Hi All,

I have a requirement to allow some and disallow some of the Latin special characters (such as Æ, Â) in the First/Last name when creating a new Identity.

After hours of research and testing I found this: ^(?:\p{L}\p{M}*|[\-a-zA-Z.ÂÃÄÄ])*$ but unfortunately it's not working properly.

Does anyone have done this before? I never used Reg. expression before so pls guide me through this requirement.

Many thanks.

Regards,

Ridouan

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

try

^[^()?:\p{L}\p{M}*|[\-a-zA-Z.ÂÃÄÄ]*

former_member192766
Participant
0 Kudos

Hi Chris,

I have tested the above Regular Expression but it's even not allowing us to add the normal Latin characters.

Any other idea's?

Regards,

Ridouan

Former Member
0 Kudos

remove the a-z and A-Z if you'd like to allow those characters.  So...

^[^()?:\p{L}\p{M}*|[\-.ÂÃÄÄ]*