Joined: April 2006
||Posted: Dec. 20 2007,02:35
|Quote (^thehatsrule^ @ Dec. 19 2007,20:15)|
|What doesn't work? Perhaps the text you require replacing is different?|
I didn't know you expected it to work as is. As posted, it doesn't match. Eliminating the first set of (), it yields an illegal back ref error.
Edit: I'm checking through a few pages now on pattern matching in vim.
EDIT: Hmm...Now it works! Thanks HATS....I have no idea why it didn't work before, since I pasted it in. (I guess I needed to go through the page I posted to see WHY it works before it would work.....)
note: perhaps I hadn't included the range previously....
EDIT: The '+' doesn't seem to work for getting additional digits, but a '*' does. Thus, '1,20s/F\([0-9]*\)/F(\1)/g' ,for replacing in lines 1-20.
EDIT: After trying it out further, I found that it's also putting () after every 'F' that doesn't have a number. e.g, F(100) F()r some F()cking reason.