Finding all numbers that are bigger than 1 in vim

2009-12-24 1 min read Fedora Linux Vim Tips

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="">Adding Leading Zeros in Excel (
  • <li class="zemanta-article-ul-li"><a href="">The Best Thing About &#8221;2010&#8221; ( <li class="zemanta-article-ul-li"><a href="">Google Goggles: The World is Your Hyperlink (
<div class="zemanta-pixie"><a class="zemanta-pixie-a" href="" title="Reblog this post [with Zemanta]"><img class="zemanta-pixie-img" src="" alt="Reblog this post [with Zemanta]" /><span class="zem-script more-related more-info pretty-attribution paragraph-reblog">
comments powered by Disqus