Vim Search in Flat Files

This page has moved.  Please update your links:

I have been working with Flat Files recently, and I found Vim Search patterns can help with finding certain conditions within the file.  This pattern works very well:


Searches for n number of the preceding pattern.

For example, say you want to find any lines in the file that have a “2” in the 51st position of the file.  You can use this pattern:


So, this matches 50 characters of anything and a “2” following.


Softpanorama: Vim Regular Expressions

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: