Plugin / Regex in Meniu Bar / My Favorite - Add new keep
hello, can anyone make a new option/plugin in meniu bar, to store your favourite “regex” formula, and just to apply when need it?
You don’t say if you are wanting to do searches or searches+replaces, but either way you could record and save a macro (and then it would appear in the “Macro” menu).
The downside to this is that then the regular expressions used become very “hardcoded” – there is no existing easy way to create a situation where, for example, a regular expression(s) linked to a named menu entry could pull up the Find dialog, populate the find-what and/or replace-with boxes, and then let you edit them slightly before running the search. At least this doesn’t exist as far as I’m aware…perhaps a plugin? “RegRexPlace” (not updated since 2009) seems to be a start on this idea, but it is very basic and the author even says it needs improvement.
My favorite editor of old, MultiEdit, allowed creating and saving regular expression search data under custom names, and even had a prompting feature such that, when run, it would ask the user for some input data, and then produce a very specific search field. Something like (not remembering exact syntax very well):
<prompt “Enter a number”=my_number>this regex looks for the number `my_number`
So then when that named search is run, a prompt box pops up asking “Enter a number” and the user enters data (for example,
123); then the search will be run looking for the exact data
this regex looks for the number 123
Okay, so that example doesn’t show the power of the feature, but the basic idea is there I guess. :-)
This probably goes above and beyond what the OP is asking about, but I just thought I would throw it out there…