On 20 August 2012 14:25, Steve Simon <st...@quintile.net> wrote:
> I am confused, and appologise to all for the noise.
>
>         ,x/label="[^"]+"/ {
>                 x/ [a-z]/ | tr a-z A-Z
>         }
>
> does exactly what I wanted, I don't understand why in my toy tests it
> didn't appear to work, probably a typo.
>
> for the record I was tring to do this:
>
>         label="Hello"
> ->
>         label="Hello"      (i.e. unchanged)
>
>         label="Hello world and other planets"
> ->
>         label="Hello World And Other Planets"
>
> -Steve
>

You could also use something like the following. It would, compared to
your code, also capitalize the very first word in the quotation marks
(your Hello, if it were hello).

,x/label="[^"]+"/ .-#0+#7,.+#0-#1 y/ / .-#0,.-#0+#1 | tr a-z A-Z

It finds the label="stuff", then limits to stuff, then breaks into
words, then capitalizes the first letter of each word.

Ruda

Reply via email to