Comment #27 on issue 854 by imranoft...@gmail.com: Regular expression support for embedded argument syntax
http://code.google.com/p/robotframework/issues/detail?id=854

unless I am missing something python regular expression don't distinguish between } and \} in a normal use case.

the following are equivalent

var = 'a}{';
regex = re.compile(r'a\}\{');
regex = re.compile(r'a}{');
regex = re.compile(r'a{1}}{');

we could go with something in between

${x:\d{4}} and ${x:[^\}]+}

we can just enhance the VariableSplitter to ignore "\{" and "\}" and have it as part of the regex. Then python will handle it properly. We wouldn't need to worry about escaping backslash in this case. just mentioning that we would need to escape any literal curlies in the regex should be enough.

What are your thoughts?

Reply via email to