That’s a very easy one!
The underlying code uses a UNIX command called sed
. This does string replacements very easily, so in this case you only need to define the character to change, the _, and set the destination to -. The only place it would trip you up would be if you had a filename like “YYYY_MM_DD Minutes_Notes”. It would also replace the underscore between Minutes and Notes.
Regarding RegEx, you can find many resources online, some very deep and some nice little regex testers.
This is a deep dive but a great resource: https://www.regular-expressions.info/tutorial.html
Here is another I like: https://www.rexegg.com with a nice quick start: https://www.rexegg.com/regex-quickstart.html
This is a unique tutorial with code testing: https://regexone.com
Here is an online RegEx testing site: https://regexr.com