There is a number 2 here and a dot there:. 1. but we only want to match 1. not 2 :%s/[[:digit:]]\zs\./:/gc matches 1. (but 2) and replaces . with : (but the dot after there:.). % search the whole file s/{pattern}/{string}/ to substitute a pattern by a string. :digit: matches a digit. backslash the dot to match the dot instead of matching any character \zs marks the start of string that should be substituted g replaces all occurrences in a line c confirms each occurrence Try: \ze to set the end
No comments yet. Log in to reply on the Fediverse. Comments will appear here.