On 20 August 2012 13:12, Steve Simon <st...@quintile.net> wrote:
> Tis the season for exotic sam command language questions,
> though mine is not that exotic.
>
> I want to edit some xml (yes I know) and capitalise all the labels
> in it. I only want to do this once so I don't care that it will
> envoke tr thousands of times and take a minuite or so.
>
> This is what I tried:
>
>         ,x/label="[^"]+"/ {
>                 x/ [a-z]/ | tr a-z A-Z
>         }
>
> sadly the inner 'x' searches onward in the file and not in
> the selection (dot) generated by the outer 'x'.
>
> I tried a few more random commands but nothing very sensible,
> anyone any ideas?
>
> Seems somthing that should be easy...
>
> -Steve
>

1) what's wrong with
,x/label="[^"]+"/ | tr a-z A-Z
?
(besides that it also capitalizes label -> LABEL; but this would do
your code too)

2) I will think about your own code later.

Ruda

Reply via email to