Closed f-trivino closed 3 years ago
We will need to use [
and ]
to group 8 and 9
In [1]: host8 = {"os": "rhel-8"}
In [2]: host9 = {"os": "rhel-9"}
In [3]: import re
In [4]: re.match(r"(rhel-8|9)", host8["os"])
Out[4]: <re.Match object; span=(0, 6), match='rhel-8'>
In [5]: re.match(r"(rhel-8|9)", host9["os"]) # > nothing
In [6]: re.match(r"(rhel-[8|9])", host9["os"])
Out[6]: <re.Match object; span=(0, 6), match='rhel-9'>
In [7]: re.match(r"(rhel-[8|9])", host8["os"])
Out[7]: <re.Match object; span=(0, 6), match='rhel-8'>
Only BaseOS variant is available for RHEL9.0 in Beaker.