For when a single regular expression is not sufficient for a mirror transformation, is there any way to access current mirror values from within interpolated shell code in snippets?
(I'm trying to write a transformation that will first convert a human phrase to CamelCase /then/ lowercase the first character to generate a StudlyCaps version of the phrase.)
-- Benjamin Hawkes-Lewis
On 2/7/09 14:57, Benjamin Hawkes-Lewis wrote:
(I'm trying to write a transformation that will first convert a human phrase to CamelCase /then/ lowercase the first character to generate a StudlyCaps version of the phrase.)
As a sidenote, I've found I can do this with conditional inserts:
${1/^(\w)(\w*)|\W*(\w)(\w*)\W*/(?1:\l$1$2)\u$3$4/g}
-- Benjamin Hawkes-Lewis
On 2 Jul 2009, at 15:57, Benjamin Hawkes-Lewis wrote:
For when a single regular expression is not sufficient for a mirror transformation, is there any way to access current mirror values from within interpolated shell code in snippets?
There is not, no — it’s difficult enough keeping track of all the mirror cascading without running arbitrary code during typing ;)