I'm trying to do a customized markdown. I am also using katex with the $ ... $ group. But when replacing expressions, if they are in the $ ... $ group, I have to not replace these expressions.
EXAMPLE : Lorem **Ipsum**(1) is *simply*(2) dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, $ \sqrt{2} **must be no bold **(3) *must be no italic *(4) $ ****(5) **(6)...
- Example (1): Start with
**and end with**and it's not in a$...$group so it will be bold. - Example (2): Start with
*and end with*and it's not in a$...$group so it will be italic. - Example (3): Start with
**and end with**but it's in a$...$group so it will not be bold. - Example (4): Start with
*and end with*but it's in a$...$group so it will not be italic. - Example (5): Start with
**and end with**but it's empty so it will not be bold. - Example (6): Start with
*and end with*but it's empty so it will not be italic.
So, I need two regex. One of them should select those that start with ** and end with ** that cannot be empty and are not in the $ ... $ group. The other is to select the ones that start with * and end with * that cannot be empty and are not in the $ ... $ group.