###MACRO: Open RegEx101.com LOG-IN @RegEx ;reg
~~~ VER: 2.0 2018-01-16 ~~~
####DOWNLOAD:
Open RegEx101.com LOG-IN @RegEx -reg.kmmacros (15 KB)
Note: This Macro was uploaded in a DISABLED state. You must enable before it can be triggered.
Use Case
- RegEx101.com is one of the best Regular Expression tools that I know of.
- I use it almost daily to develop, test, and understand RegEx.
. -
This macro automates use of RegEx101.com. It does two things you need to do to make effective use of this web site: Login and set RegEx Flags.
.- Login so that when you save a RegEx snippet it will be saved to your account.
- Default is to use your GitHub account for login/authentication. I recommend this.
- You can also use your Google or Twitter accounts.
.
- Set the Regular Expression flags that you most often (always?) want to use.
- For me, these are global and unicode flags, or gu
- The macro defaults to using these, but you can easily change them to those that you prefer.
- Here are the RegEx Flags for pcre:
.
.
- You should use the RegEx flavor pcre (php) in RegEx101.com, since this flavor is the closest match to what KM uses: ICU Regular Expressions.
- You set the RegEx flavor in RegEx101.com in the settings pop-out Sidebar:
.
- You set the RegEx flavor in RegEx101.com in the settings pop-out Sidebar:
Please feel free to post any questions, comments, and/or suggestions you have about using this macro.
###ReleaseNotes
Author.@JMichaelTX
PURPOSE:
-
Open RegEx101.com, Log In, Set Flags
- Login Using GitHub
- Set RegEx Flags: global, unicode
HOW TO USE:
- Trigger macro
- Wait for Login and setup to complete
- RegEx101.com site is now ready to use
MACRO SETUP
-
Carefully review the Release Notes and the Macro Actions
- Make sure you understand what the Macro will do.
- You are responsible for running the Macro, not me. ??
.
- Assign a Trigger to this maro. I prefer Trigger by Name using ";reg".
- Move this macro to a Macro Group that is only Active when you need this Macro.
- ENABLE this Macro.
. -
REVIEW/CHANGE THE FOLLOWING MACRO ACTIONS:
(all shown in the magenta color)
.- First Action: Login to RegEx101.com
- Default login is via "github"
- Other choices are "google" and "twitter"
.
- Set RegEx101.com Flags
- Default is: "gu", for global and unicode
- Change as desired.
- First Action: Login to RegEx101.com
REQUIRES:
- KM 8.0.2+
- But it can be written in KM 7.3.1+
- It is KM8 specific just because some of the Actions have changed to make things simpler, but equivalent Actions are available in KM 7.3.1.
.
- macOS 10.11.6+ (El Capitan)
- KM 8 Requires Yosemite or later, so this macro will probably run on Yosemite, but I make no guarantees.
NOTICE: This macro/script is just an Example
- It has had very limited testing.
- You need to test further before using in a production environment.
- It does not have extensive error checking/handling.
- It may not be complete. It is provided as an example to show you one approach to solving a problem.
TAGS: @RegEx @Web @URL
USER SETTINGS:
- Any Action in magenta color is designed to be changed by end-user
ACTION COLOR CODES
- To facilitate the reading, customizing, and maintenance of this macro,
key Actions are colored as follows: - GREEN -- Key Comments designed to highlight main sections of macro
- MAGENTA -- Actions designed to be customized by user
- YELLOW -- Primary Actions (usually the main purpose of the macro)
- ORANGE -- Actions that permanently destroy Variables or Clipboards,
OR IF/THEN and PAUSE Actions
USE AT YOUR OWN RISK
- While I have given this limited testing, and to the best of my knowledge will do no harm, I cannot guarantee it.
- If you have any doubts or questions:
- Ask first
- Turn on the KM Debugger from the KM Status Menu, and step through the macro, making sure you understand what it is doing with each Action.