fjcaetano / NSStringMask

NSStringMask allows you to apply masks or formats to NSStrings using NSRegularExpression to input your format.
http://fjcaetano.github.io/NSStringMask/
MIT License
241 stars 36 forks source link

how can i get the original string in textfield? #9

Closed carlosandresSanchez closed 9 years ago

fjcaetano commented 9 years ago

@carlosandresSanchez, what do you mean by "original string"? The cleaned string?

You can access the current value of the textfield normally as textfield.text or you may need something like [textfield.mask validCharactersForString:textfield.text].

fjcaetano commented 9 years ago

Let me know if this works for you

carlosandresSanchez commented 9 years ago

what I need is the cleaned string. If with my masked string i Have 55 5555 5555, what I want is to get the string : "5555555555".

fjcaetano commented 9 years ago

Did you try using the validCharactersForString: method I described?

carlosandresSanchez commented 9 years ago

Yes, excuse me. it works with the validCharactersForString: method.

Thank you so much!!

fjcaetano commented 9 years ago

Excellent!