The KM Wiki offers some help for RegEx:
Regular Expressions
but to learn it I recommend
Regular-Expressions.info - Regex Tutorial, Examples and Reference - Regexp Patterns
and make good use of RegEx101.com to develop, text, and see detailed explanation of RegEx patterns.
Local Variables persist ONLY for the duration of the Macro in which they are created. So, you will need to use a global variable, which is any variable that does NOT start with "Local" or "Instance".
I use this naming convention for global variables:
DND_<MasterPrefix>__<VariableName>
where
DND -- stands for Do Not Delete
<MasterPrefix> -- a short 3-4 character prefix which associates that variable with
a specific macro, or set of macros.
This usually comes from the first 3 words of the Macro Name.
<VariableName> -- Identifies the specific variable. I use CamelCase.
This naming convention allow me to easily:
- Identify all global variable that MUST NOT be deleted
- Identify all variables associated with a specific macro or set of macros
- Avoid unintended reuse of the same variable name in different macros, overwriting data that it should not.
- Use of the double underline removes the entire prefix from display in Prompt for User Input Actions
Each of use may have our own naming convention. Pick one that works for you, and stick with it.
So, in your use case, I would probably name the "Local__Product" variable as:
DND_PJO__Product
where "PJO" is my made-up prefix for "Process Jewelry Orders"