

This will be all about typing into the text box. Pasted strings are a little bit troublesome depending on what you’re trying to extract. One difference is that I’m not attempting to tolerate pasted in strings. I’m used to thinking of it as ‘conditioning’ the data. integer, positive only double, currency, etc). BackgroundĪs with Jan’s article, the purpose is to ensure that the characters entered into a TextBox control are always in the form required for the data being captured (e.g. Regex has been key to doing this.Īnyway… I indicated I’d write an article, so here (finally) it is. Over the years I'vehad to process a lot of formatted text data files.

Regex patterns could also be derived to apply other restrictions to a TextBox control, or any other textual input control. The thought I had was that Regular Expressions (Regex) could be used to achieve a similar result with less raw character processing, by letting. I was simply adding ideas to the conversation. I have a suspicion he thought I was being critical. I think something might have been lost in translation. To this end I gave him five stars for his article and ‘raised him a Regex’. All programmers need this in their tool kit.

I thought it was a great article for covering character processing of strings. This article comes from an idea that occurred to me when I encountered an earlier version (since removed) of this article by Jan Martin:
