I'm trying to create a regex that matches comparisons like this:
= 445
> 5
>= 22
< 3
<= 42
<> 10
I thought that this would work, but it doesn't:
[=|>|<|>=|<|<=|<>]\s\d+
It's very important that the '>' or '<' precede '='. These operators would not be valid:
=<
=>
>>
<<
==
I'm using this to create some dynamic sql so the comparison operators need to valid sql.
Any suggestions?