I want to create an expression which will select the first word immediately preceding every equals sign.
For example, take this sentence
"execute code='hello I am a program'"
In the example above, I just the word 'code', since it is the first word to precede an equals sign
The closest I've come to it is [^\s]+(?:[=]), which selects 'code='
If the sentence were "execute code = 'hello I am a program'" (all I did was add spaces)
then the selection we want would be 'code' still, but my current expression wouldn't find anything
I've tried other expressions that are also partially correct, such as [a-zA-Z]+[^=]
This one does would print out 'execute code' and 'execute code ' for both the cases above, respectively.
Please help, I cannot figure this out