[Clip] Re: modifying format of stats tool output & concatenating stats from many files
- --- In firstname.lastname@example.org, Alec Burgess <buralex@...> wrote:
>No, of course not. :)
> Sheri (silvermoonwoman@...) wrote (in part) (on 2010-03-01 at
> > ^$GetDocListAll("(?i)(^\^\!Set(Array|Code)?\x20|;\x20?)\K%[\d\pL_]+?%(?=\=)";"^!ClearVariable
> > $0\r\n")$"
> Sheri: wrt to your "find variables for clearing" clip. You appear
> from the comments but haven't checked the regex itself, to be
> expecting a
> variable xxx to be defined as:
> ^!set %xxx%=asdf
> Following works though I use the construct without %...% only
> accidentally :-[ :
> ^!set xxx=asdf
> ^!info ^%xxx%
> Will your clip capture this usage?
But (sigh) I suppose by failing to capture them, it is remotely possible that some "accidental" variables would fail to get released.
So perhaps it would be better to modify the capture part as follows:
^!Set %varnames%="^$GetDocListAll("(?i)(^\^\!Set(Array|Code)?\x20|;\x20?)\K(%?)([\d\pL_]+?)\3(?=\=)";"^!ClearVariable %$4%\r\n")$"