I personally do this type of thing in PhraseExpress, a Windows scripting program free for personal use.
http://www.phraseexpress.com/download.php
Here's a PhraseExpress import-file. This is indented for clarity, but must be UN-indented in order to import it into PhraseExpress. DUPLICATE the file, un-indent that duplicate, then import THAT file.
my_regexes_ddmenu.px.txt:
Code: Select all
My regexes -- mrx . mr
Other regexes -- mrxp (mxp[1-4]) . mrx
^\t+([^\t]) ^\t+([^\t]) mrxp
([A-Za-z0-9_]+) ([A-Za-z0-9_]+) mrxp
([...]+) ([]+){#LEFT -count 3} mrx
(This is three columns, tab-delimited: Description, phrase-body, and autotext)
When you install it as I say below, you can type "mrx", and you'll see a pop-up with
- Other regexes -- mrxp
([...]+)
Then, if you add a "p", you'll see
- ^\t+([^\t])
([A-Za-z0-9_]+)
Click on any item (use your down arrow, then type a TAB--I think it's a tab), and the regex will be typed.
It's a bit of a pain to get it started, but once it is started, you'll fly. It's really easy to edit your regex drop-down (just re-import it).
ONE-TIME-ONLY SETUP
Before importing the regex-drop-down file for the first-time, create a folder in PhraseExpress called "Drop-down menus". Select the folder and:
- Click the "Expert Options" button, on the bottom right
- Prefix drop-down: None
- Manual confirm checked
IMPORTING THE FILE
-1- Open PhraseExpress, and move it to the right-side of your screen.
-2- Open a Windows Explorer window containing the UN-INDENTED drop-down file.
-3- Drag the file from explorer
into the "Drop-down menus" folder.
-4- A dialog pops up with four radio options. Choose the bottom option (one phrase-per-line) then press OK.
-5- Import it with TAB as the delimiter char, and the "description-phrasebody-autotext" format. Confirm.
That's it. Now close PhraseExpress, and you should be able to use it as I mention above.
Each change you make to the import-text file, follow the IMPORTING steps.
Of course, you could create this heirarchy directly in PhraseExpress, but I recommend against it. Once you start creating stuff in PhraseExpress, you're trapped in it. I MUCH prefer editing my phrases in TextPad (there's no REGEX replacement in PhraseExpress, for example). While PhraseExpress has MANY options for importing, there's only ONE option for exporting.
---
I know this is a lot, but it is a very useful and quick-to-update thing once you get the hang of it. Ask me questions and I'll help you through the setup.