I am in the need of an regexp that checks if one numerical value is greater then another value.
Pretty much like I would by writing (if 10>8)
...
Cl
It is not something straightforwardly done with regular expressions. The language you are programming in may allow extensions to the regexp syntax to plug in arbitrary code. For example in Perl:
$_ = '54 55';
say 'matched' if /\A(\d\d) (\d\d)(?(?{$1 >= $2})(*FAIL))\z/;
This succeeds but 56 55
does not. In https://stackoverflow.com/a/30936388/626804 I explain a bit further.
Whether this is good taste or a good idea is another matter - but in Perl you can jam this kind of comparison into a so-called 'regular expression' match if you really want.