Page 1 of 1

Want regex 'select' capability for scripting

Posted: 27 Jul 2015 03:34
by Papoulka
IMHO a direct script command to select list pane items via regex would be a natural for XY. An alternate method exists but is complicated.

Maybe 'selfilter' could have an 'r' flag after its existing options. If 'r' is set the "pattern" would be treated as a regex, and items would be selected if there is any match. Otherwise all works as it does now.

Thx

Re: Want regex 'select' capability

Posted: 27 Jul 2015 10:13
by bdeshi
justsoyouknow, Edit > Select > Selection Filter supports regex (prefix pattern by >)

Re: Want regex 'select' capability for scripting

Posted: 09 Aug 2015 07:14
by highend

Code: Select all

selectitems regexmatches(listpane(,,4), "(\||^)chrome.*?(\||$)");
Don't think that's too difficult...

Re: Want regex 'select' capability for scripting

Posted: 09 Aug 2015 20:08
by Papoulka
"Too difficult" is relative. With your specific example in front of me, I can see how it's done. Personally I would (and will) have to refer to this every time, as I can't reliably recreate it from memory.

So, it would be great for those of us less skilled to have a direct syntax, without parsing the listpane report.

For now, it would be good to have what you've shown appear in the Help for "Selectitems" as it creates such a powerful technique. Especially with the ability to Add and Remove from the selections by further Selectitems commands.


That said, XY can do what I need and you have shown how. I think it will help a lot of folks.

Thanks again.