In a data file I need to find all lines that contain less than 10 times the pattern |^| I need them in two ways:
I use Gvim in Windows.
So far I've tried along the lines of:
/[|^|]{,9}
/[|^|]*{,9}
:g/\v(\|[^|^|]*){,9}/p
Is anyone able to help me?
Edit: an example (as real data is not allowed to be used)
abc|^|def|^|ghi|^|jkl|^|mno|^|pqr|^|stu|^|vwx|^|yza|^|bcd|^|efg
abc|^|def|^|ghi|^|jkl|^|mno|^|pqr|^|stu|^|vwx|^|yza|^|
bcd|^|efg
abc|^|def|^|ghi|^|jkl|^|mno|^|pqr|^|stu|^|vwx|^|yza|^|bcd|^|efg
Final solution:
:v/\v(\|\^\|.*){10}
I tried this one. I think it will help.
/\(|^|.*\)\{10}
or with \v
/\v(\|\^\|.*){10}