$regLinks = "~meaning+?.{0,500}\\.~siU";
I need the last period, the \\.
to be not inside of less than sign, and the greater than sign <>
. So something like <color blue.>
would be skipped over. How would I achieve that in regex?
$string "meaning: sad is when you are unhappy <blue green.> right now.";
^---So out of this, instead of stopping at <blue green.>
, it should stop at
meaning: sad is when you are unhappy `<blue green.>` right now.