You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The documentation for “Create class” says: “Substring: regex-defined substring that will match the values from the above-defined attribute”
I took this to mean that you can define an arbitrary regular expression in the Substring field, but as can be seen in the attached screenshot, when I entered .*—which should match any string—I got no matches at all. I have played around with the input and it seems that what you enter is actually treated as a literal substring to be matched. If this is the intended behaviour, then please treat this as a feature request:
I’d like the Substring field to support the full Python regular expression syntax, including \number, so that matched substrings can be used in the Name section. In my concrete case I want to enter the Substring (.*) \([12]\) and use \1 in the Name field, so that the item Belgium (2) is renamed Belgium.
Failing that, “regex-defined” should be deleted from the documentation text.
How can we reproduce the problem?
Input any data. Connect to a “Create Class” widget. Select any string feature. Enter .* as Substring. Note that no strings are matched.
What's wrong?
The documentation for “Create class” says: “Substring: regex-defined substring that will match the values from the above-defined attribute”
I took this to mean that you can define an arbitrary regular expression in the Substring field, but as can be seen in the attached screenshot, when I entered
.*
—which should match any string—I got no matches at all. I have played around with the input and it seems that what you enter is actually treated as a literal substring to be matched. If this is the intended behaviour, then please treat this as a feature request:I’d like the Substring field to support the full Python regular expression syntax, including
\number
, so that matched substrings can be used in the Name section. In my concrete case I want to enter the Substring(.*) \([12]\)
and use\1
in the Name field, so that the itemBelgium (2)
is renamedBelgium
.Failing that, “regex-defined” should be deleted from the documentation text.
How can we reproduce the problem?
Input any data. Connect to a “Create Class” widget. Select any string feature. Enter
.*
as Substring. Note that no strings are matched.What's your environment?
The text was updated successfully, but these errors were encountered: