The string I need to modify in a hardware driver .conf file is as follows:
options rsi_sdio dev_oper_mode=13
Looks simple enough, but the developers are happy to change this string which will break a sed expression that matches with precision. I now have to treat the string preceeding the value as "indeterminate"; it cannot be reliably predicted with 100% precision.
Therefore I can only match on the value itself, which can itself also variable: it's currently "13" but this could change in future. The only "known" is the value that I need to modify can be either 1 or 2 digits in length.
So I need a bullet-proof regex that can guarantee the value can be successfully set even if both the string and value change to avoid breakage!