Hi,
I want to extract model name and revision from the '<GETVER>>' command.
I have a few examples from users of pygmc:
<GETVER>>='GMC-800Re1.08' --> model='GMC-800' re=1.08
<GETVER>>='GMC-600+Re 2.52' --> model='GMC-600+' re=2.52
<GETVER>>='GMC-500+Re 2.22' --> model='GMC-500+' re=2.22
<GETVER>>='GMC-320Re 4.26' --> model='GMC-320' re=4.26
<GETVER>>='GMC-300SRe 1.14' --> model='GMC-300S' re=1.14
<GETVER>>='GMC-SE Re 1.05' --> model='GMC-SE' re=1.05
The Python regex I plan to use is "([^ ]*) ?Re ?([0-9.]*)"
I have a few questions:
- Is there a naming/formatting specification?
- Is there or do you foresee a model with a space " " in its name?
- Does the revision always start with exactly "Re"?
- Is the revision always in the format "X.YY" where X & Y are always integers?
The intent is to auto-map a user's device to the correct config parser (since config structure can change with revision) in https://github.com/Wikilicious/pygmc