Should Match Regexp

I test a Regexp in

I paste it in the robot file after.

Should Match Regexp.

Push to Git, Test in Docker… FAILS.
TypeError: expected string does not match pattern as a regular expression.


Can it be made so that:
If I test it online and paste it into Robot file… it works.

  1. either it auto-reformats
  2. it reads it correctly under the hood.

Please read carefully the documentation, for Should Match Regexp, see the example where the \ must be escaped with another \, resulting in \\. This means you cannot copy and paste from some regex verification site.




the fault was in the ${count}

${count} Get Element Count xpath=bla , was not a string

${countstring}   Convert To String   ${count}
Should Match Regexp   ${countstring}   ^[1-9]\d*$

… made it work