我想写一个正则表达式来检查风向条件。我想从用户那里得到这样的输入:
BETWEEN (45 AND 90) OR (270 AND 320)
BETWEEN
,当然是关键字AND
,OR
括号内可以有多个条件,()
由OR
例如:
BETWEEN (45 AND 90)
BETWEEN (45 AND 90) OR (270 AND 320)
BETWEEN (15 AND 40) OR (170 AND 200) OR (270 AND 320)
BETWEEN (45 AND 90) OR (270 AND 320) OR (220 AND 240) OR (270 AND 320)
数值应介于 0 和 360 之间。我想为用户提供输入多个条件的选项。