taji01 taji01 - 10 months ago 69
Linux Question

Search VI for letters and numbers

I use vi at work and i have to search for a string of specific letters & numbers such as these:


there are always (3)Letters and (5)Numbers. Is there a way to search for these strings easily? Maybe with regex or something else.


Just type


The \v activates the very magic mode to avoid escaping here. What follows is probably self-explanatory, assuming you know that \d is a digit in regular expressions.

Documentation on searching in vim