September 11, 2009 Javascript Actionscript ASP.NET Validation Regular expressions Snippet Here's a nice piece of regular expression submitted by Nils that allow validation against two different formats, in this case 10 or 12 numbers:^[0-9]{10}(?: [0-9]{2})?$ Share this article: Related posts: C#: Remove all non numeric characters from a string using Regex 3 must have tools for .net developers Remove extra white-spaces within a string Extract image tags from HTML in C# Extend String with trim functions Comments Please enable JavaScript to view the comments powered by Disqus. comments powered by Disqus
Comments
comments powered by Disqus