Open evertoncunha opened 7 years ago
What are you trying to accomplish with the (.*)
at the end? Could you provide an example of a valid formatted string for your patter?
It's a pattern for 🇧🇷 barcode payments while you type. Example: 55555 55555.5 55555.55555 55555.55555 5 55555.55555 55555.666666 55555.666666 1 00000000000014
The (.*)
at the end is to accept any number after any case of the pattern.
You really shouldn't have a group that captures and formats without a limited count. It does fall into an infinite loop in the do-while in [NSStringMask validCharactersForString:(NSString*)]
. Could you try limiting the characters captured by that (.*)
? Also, by using the dot-star pattern, you'd be capturing any characters, not only digits, spaces and dots.
Perhaps there should be a warning or some other verification at execution time for unlimited repetitions patterns.
I do a "numbers only" filter previous this function. But the strange thing is that it works fine at version 1.2.1. I'll stick with the previous version then 🤔 .
That is super weird. I couldn't see anything obvious that might have broken it. I'll get back to this when I get the chance, so I'll leave your issue open for now.
I'm getting "terminated due to memory issue", on version 1.2.2. It's working fine on v1.2.1.
You can try to pass any value, like
maskTitle(readable: "1")