in my bash script I use a regexp to match a string of variable assignment,
for instance:
- Var = Value
- var = Value;
- Var=Value
- Var=Value;
- Var Value
the regexp i developed: \s*${varName}\s*\={0,1}\s*.*\s*;{0,1}
this regexp can match every instances above but also another instance that I don’t want, which is VarValue
I cannot think of a way to make my regexp to not match the VarValue instance.
Modifying yours: