Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.programming Subject: Re: Developer IDE search/replace extensions Date: Wed, 18 Jan 2017 00:10:25 +0000 Organization: A noiseless patient Spider Lines: 30 Message-ID: <87y3y9fcsu.fsf@bsb.me.uk> References: <865500e8-bff0-4387-9f04-d28457f7a68a@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="09c65c3808e719bdbaa21d343bb77f56"; logging-data="10342"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/vWUjyjYCMb7Mho0BRvTCy+UihgjtZdvw=" Cancel-Lock: sha1:GIfIqIKdsFo+NPHAmHzNRy4PvDI= sha1:ow9zr+ZroC7ur32gfB17z5ZOc6U= X-BSB-Auth: 1.8eb2aa67d69ddfcd1e2f.20170118001025GMT.87y3y9fcsu.fsf@bsb.me.uk Xref: csiph.com comp.programming:7314 "Rick C. Hodgin" writes: > I wanted to get some feedback from developers. I'm creating a text > editor/IDE with search/replace functionality. I want to be able to > do things like this: > > Source code contains this function: iSomething_otherPart() > > Without getting into refactoring abilities, just as a raw text-replace > feature, to search for the pattern "i*_*" and replace it with a form > which results in this output: > > iOtherPart() > > It has taken "iSomething_o" and replaced it with "iO". > > How would you like to see that being done in an IDE if you were not > tied to current limitations or regex expression syntaxes? I'm not unhappy with the standard regex method, but that's familiarity rather than any sense that it's optimal. Regexps are a sort of lingua franca in computing (though there are annoying differences in detail) so using that method will have other benefits. I'd be more interested in extending things that regexps can't usually do: for example recognising when i\w+_\w+ is a symbol and when it's in a string. -- Ben.