So, I've just gotten into creating aliases, and I don't know how I didn't do this before! But I want to create an alias with optional parameters, and regex is not working for me.
The program (QuickNote for OneNote - note.exe) allows you to feed in the note text, a switch for displaying the note, and a switch for the category. I want the switch for the category to be optional.
QuickNote - $$1 | C:\Users\wraith808\My Files\Dropbox\Tools\QuickNote\Note.exe $$1 /sect $$2
QuickNote and Display - $$1 | C:\Users\wraith808\My Files\Dropbox\Tools\QuickNote\Note.exe $$1 /disp /sect $$2
It works... but you have to put a , at the end (I tried making the , optional, but that made it match the whole string, instead of splitting it). I can live with that, even though it's suboptimal.
Is there a way to make it, however, so that if the second param is empty, it uses a default for that second parameter? Or to check if that second parameter is set, and change behavior based on that?