RobinHerbots / Inputmask

Input Mask plugin
https://robinherbots.github.io/Inputmask/
MIT License
6.37k stars 2.17k forks source link

Unicode categories such as \p{P} or \p{S} does not work in `regexp` property #2741

Closed artuska closed 9 months ago

artuska commented 10 months ago

Unicode categories with the slash sign converts to the double slash and regexp become corrupred after the createMask function.

So, if i pass regex: '[\p{P}\p{S}]*' to the createMask function and then console.log function result i got regex: "[\\p{P}\\p{S}]*"

And now i'm able to enter in the inputmask input only p, P and S characters.

RobinHerbots commented 9 months ago

@artuska ,

Can you elaborate a bit.

It is not quiet clear what you mean.

RobinHerbots commented 9 months ago

Nevermind, I know what you mean.

I will see how to fix this.

RobinHerbots commented 9 months ago

@artuska ,

The issue is fixed but I need to push a new build. Will do that soon.

RobinHerbots commented 9 months ago

Have a try with the latest beta version on npm 5.0.9-beta.33