I have this regex: /\*([^<|\n|\r]+)/
which matches all characters in a string starting with a * and ending in a new line or a ‘<‘, how can I modify this regex to not match strings if they start with a ** (so it will not match if the second character is also a *)
What you need is negative lookarounds.
Also,
[^<|\n|\r]doesn’t do what you think it does. It will match anything that isn’t<,\n,\r, or a literal|character. You don’t need the|inside a character class unless you want to match a literal|.