| Searching for question marks in VIM
|
thesheep

msg:934599 | 5:20 pm on May 23, 2006 (gmt 0) | How do I search for a string starting with a '?' in VIM (I want to replace it with £)? I've tried: :% s/?/£/g and also :% s/\?/£/g to try and escape the special meaning of '?' but neither of these two work...
|
thesheep

msg:934600 | 12:38 pm on May 26, 2006 (gmt 0) | Nobody?...
|
coopster

msg:934601 | 12:55 pm on May 26, 2006 (gmt 0) | Looks correct to me except for the space between the range and the search pattern, get rid of the space:
:%s/?/£/g
|
thesheep

msg:934602 | 1:09 pm on May 26, 2006 (gmt 0) | Hi, actually it seems that the space there doesn't make any difference. But I think I'm figuring out what's going on. I've got a file written on Windows, with a bunch of pound signs £ in it. When I look at it in VIM on OSX, they show up as ? But now I'm thinking that these are not actually question marks, they're the windows character code for the pound sign, which is probably what I need to search and replace. Now I just need to find out how to do that...
|
|
|