How to find if two intervals overlap?

I’m trying to check if users input intervals in a correct usable way for my script to handle an input.

I expect my users to write something like
4-50=£54, -4=£45, +50=£89

I’ve split up every part into an arrays.
And I have the following array I want to check if the ranges overlap
[“4-50”,"-4", “+50”]

Does anyone know the best way to check if any of the ranges overlap?

This topic was solved and automatically closed 15 days after the last reply. New replies are no longer allowed.