/^([2-9]d*|1d+)
If we have a csv like structure
The trick here is simple, lets look at the regex from the begining:
^ β start from the begining
() β start and end of block
[] β digits within this. So we are looking from 2 to 9 to exclude the numbers begining with 1
d β search for digits
- β search for one or more
| β or operation
1 β search for numbers begining with 1
- β containing atleast one occurence or more.<h6 class="zemanta-related-title">Related articles by Zemanta <ul class="zemanta-article-ul"> <li class="zemanta-article-ul-li"><a href="http://sparksspace.blogspot.com/2009/10/adding-leading-zeros-in-excel.html">Adding Leading Zeros in Excel (sparksspace.blogspot.com)
<li class="zemanta-article-ul-li"><a href="http://blog.creativethink.com/2009/11/the-best-thing-about-2010.html">The Best Thing About ”2010” (creativethink.com) <li class="zemanta-article-ul-li"><a href="http://www.revenews.com/jackbusch/google-goggles-the-world-is-your-hyperlink/">Google Goggles: The World is Your Hyperlink (revenews.com)
<div class="zemanta-pixie"><a class="zemanta-pixie-a" href="http://reblog.zemanta.com/zemified/e022d83e-669e-4cad-894c-cdab54a1946c/" title="Reblog this post [with Zemanta]"><img class="zemanta-pixie-img" src="http://blog.amit-agarwal.co.in/wp-content/uploads/2010/08/reblog_e34.png" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">