How to search not matching pattern in VIM
regex, search, string, vim
Solution
can you try this, see if it works for your requirement?
/ts\[[^j]\]
Problem
Here is an excerpt of my `.py` file: ``` for i in range(1,nxs-2): for j in (1, nts-2): dg_cc(dg,sina,cosa,s,r2tanb,omega,L,n,m,xs[i],ts[k],pd) dot( dg,F,c1,transa=T ) dot( c1, dg, ansK1, N, N, alpha=2., beta=1. ) # linear buckling part g = g_cc(m,n,L,xs[i],ts[j],pd) Bg = fBg(Bg,cosa,s,L,m,n,xs[i],ts[i],pd) dot( g, Bg, ansK1, T, N, alpha=2., beta=1. ) # if pd: fdg0(dg0,sina,cosa,s,r2tanb,omega,L,xs[i],ts[j]) dot( dg0, F, c2, transa=T ) dot( c2, dg, ansK0, N, N, alpha=2., beta=1. ) for i in (1, nxs-2): for j in range(1,nts-2): dg_cc(dg,sina,cosa,s,r2tanb,omega,L,n,m,xs[i],ts[n],pd) dot( dg,F,c1,transa=T ) dot( c1, dg, ansK1, N, N, alpha=2., beta=1. ) # linear buckling part g = g_cc(m,n,L,xs[i],ts[j],pd) Bg = fBg(Bg,cosa,s,L,m,n,xs[i],ts[j],pd) dot( g, Bg, ansK1, T, N, alpha=2., beta=1. ) ``` I have to fix all the typos keeping only `ts[j]` and fixing those with `ts[i]` or `ts[n]`, for example. How do I build my searching pattern in order to get everywhere where `ts[something]` `something NOT equal j`?