I have to find words which are having this pattern:
File{some numeric characters}=
Example: File1=
, File234=
, File3456=
and delete them.
This is the line:
File1=/media/sda5/
now I have to replace this line with:
/media/sda5/
Since I am new to vim, So if anyone can help me
This command should do what you want:
:%s/File\d\+=//g
:%s/ perform substitution on each line in the buffer
File\d\+= matches 'File' followed by one or more digits until the first '='
// deletes the matched text
g do that on every match on the line
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments