-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for non-raw strings as a delimiter option (doubly-escaped symbols) #2223
Comments
Hello @seojumper, Here's some potentially helpful things in the meantime: Replace \\ with \ To get the escaped stuff, select |
That is a handy workaround/workflow that I'll add to our teams docs. Thank you. |
+1 I need to manually replace |
This comes up all the time in JavaScript, too. Sometimes you need to define a regex as a quoted string, e.g., if you want to use a dynamic variable in the pattern ( From a usability standpoint, I often confuse myself by going back and forth between these formats. |
Feature
We use the site for helping to build out regex patterns for Robot Framework which provides a number of keywords for using regex patterns in tests. These keywords require regex patterns provided to keywords be "double escaped" as a lone '\' char will cause the script to fail to be parsed correctly by the Robot runtime.
From Robot's documentation https://robotframework.org/robotframework/latest/libraries/BuiltIn.html#Regular%20expressions
Inside of a robot script file an example usage of one of such keywords must look like this where you see the pattern must have double escaped symbols or will not be parsed correctly.
Since we are needing to work "in code" with "doubly escaped" symbols in patterns, it would be handy if the site could offer a non-raw delimiter option for its python engine that understands doubly-escaped symbols.
Currently when writing these files (as a number of folks enjoy using the site to aid in creating/tshooting the patterns they write) we are taking a doubly-escaped pattern from Robot script > copying it over to the site > manually removing double escapes so the site can understand it > fixing the pattern with the help of the site >
copying the fixed pattern back into robot and manually re-inserting the double escape sequences where needed which is a very error prone process, and also a friction point when you need to make multiple iterations on a pattern.
Would be nice if support for this could be reconsidered as it would certainly make the site that much easier to use for our (and other Robot users) use case.
The text was updated successfully, but these errors were encountered: