From: Austin Ziegler Date: 2003-04-18T01:49:42+09:00 Subject: Re: Regexp quoting (again) On Thu, 17 Apr 2003 22:12:59 +0900, Dave Thomas wrote: > I know this has been discussed at length, but could I put in a > vote not to warn on /]/. I now have a lot of legacy code that > generates warnings, and for the life of me I can't see a good > reason for it. It's a bit like generating warnings for characters > inside strings: > > "1) Break 3 eggs in a bowl" > > recipe:1 warning - unmatched closing parenthesis in string > > The ']' in a regexp is a terminator, and is not otherwise special. > Why should it need to be escaped? I agree. vim recognises a bare ] properly, and I do a lot of my regexp testing in vim (perhaps not a good idea, but...). vim, in fact, recognises /[/, /[]/, and /]/ as valid character searches. /[]]/ is the same as /]/ or /[\]]/. I'm not sure how hard this would be, but aside from /[]]/, I don't think that any of these would/should be problematic. -austin -- Austin Ziegler, austin@halostatue.ca on 2003.04.17 at 12:20:08