Evaluate a chain of inequalities Write code to evaluate whether a chain of inequalities is true or false. An example input is the string 

3&lt;=4!=9&gt;3==3

This is true because each of its components is true:

(3&lt;=4) and (4!=9) and (9&gt;3) and (3==3)

Input:

A string that represents a chain of one or more inequalities. The allowed comparison operators are

==   equals
!=   does not equal
&gt;    is greater than
&gt;=   is greater than or equal to
&lt;    is less than
&lt;=   is less than or equal to


The allowed numbers are single-digit numbers 0 through 9. There won't be any spaces, parentheses, or other symbols.

Output:

The correctness of the inequality as a consistent Truthy or Falsey value. Consistent means every Truthy output is the same and every Falsey output is the same.

Restriction:

The intent of this challenge is for you to write code that processes the inequalities, rather than have them be evaluating them as code, even for a single inequality in the chain. As such, methods like Python's eval and exec that evaluate or execute code are banned. So are functions which look up a method or operator given its name as a string. Nor is it allowed to launching processes or programs to do the evaluation for you.

Test cases:

3&lt;=4!=9&gt;3==3
True

3&lt;=4!=4
False

5&gt;5
False

8==8&lt;9&gt;0!=2&gt;=1
True
Ruby, 71 + 1 = 72

With command-line flag -n, run

p (0..99).none?{|i|~/#{a=i%10}(#{%w/!=|. &lt;?=* &gt;?=*/[a&lt;=&gt;b=i/10]})#{b}/}


Generates all possible failing regular expressions, and checks whether the input string matches any of them. Outputs true if none do, else false. Takes input via STDIN, separated by newlines.

Tricks:


We get all possible pairs of digits by looping from 0 to 99 and extracting the 10s and 1s digits.
The only actual comparison we do is a&lt;=&gt;b, which returns -1,0,or 1 for less than, equal to, or greater. These all slice to different elements of a three-string array, finding the regular expression for comparisons that don't match.