Comment #28 on issue 854 by pekka.klarck: Regular expression support for embedded argument syntax
http://code.google.com/p/robotframework/issues/detail?id=854

Unfortunately "\}" works only when "}" is interpreted literally but not otherwise:

re.search('\d{4}', '2011') is not None
True
re.search('\d{4\}', '2011') is not None
False

We thus need to unescape '\}' in order to be use it. I implemented that first so that the whole patter was unescaped using utils.unescape, but after that it was necessary to unescape all backslashes like in '\\d{4\}'. I didn't like that too much and decided to handle unescaping simply with 'patern.replace(r"\}", "}")'. I commit that implementation next.

Reply via email to