[CALUG] vim regex challenge

Howard L how0909 at freeshell.org
Sat Apr 4 17:46:13 EDT 2015


hello. I am trying to trim two octets of addresses in vim.

eg:
99.198.98.8
99.198

I've been trying things like:
: s/\.\d.*$//g
or
: s/\.\d\{1,3\}.*$//g

I feel like the first should work from the right to left for one octet 
but it seems to want to start at the first dot.
The second doesn't find any match at all...

Thanks, Howard();



More information about the CALUG mailing list