Comment #17 on issue 854 by pekka.klarck: Regular expression support for
embedded argument syntax
http://code.google.com/p/robotframework/issues/detail?id=854
Yeah, the reason variables don't work is the variable name is used in the
match literally. Currently variable values are resolved only after the
regexp match but potentially it could be done earlier.
I'm not sure how that should work with non-string variable values, though.
We could put the string representation of the variable into the matched
string, but then we wouldn't get the real value to the keyword. Notice that
currently in this case the value of ${x} will be an integer and I don't
want to loose that functionality:
***TestCases***
Example
I say ${42}
***Keywords***
I say ${x}
Something
I'm open for suggestions on how this should be handled. Currently I think
requiring the custom regexp to match the variable too sounds like the best
solution. That obviously should be documented in the User Guide.