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
{{ message }}
Repository navigation
Does the input field accept regular expressions? #58
version workflow external scripts 1.4.0, nextcloud server 19.0.2
in
'if file created and filename is " "', does the input field accept regular expressions? Only when I enter a static name eg. "testfile.txt" my script gets executed. Entering "test*.txt" oder "test.*.txt" doesn't match for "testfile.txt". Is a special syntax needed?
The only selection possible is (in the german version) "ist/ist nicht" translated "is/is not" ? I can enter a value, would I use "entspricht"? Can I find the german values somewhere in the source?
found apps/workflowengine/l10n/de_DE.js: "entspricht/entspricht nicht". But why do these values not show up in the dropdown menu? I'm using chromium Version 84.0.4147.135 (openSUSE Build) (64-Bit).
Further tests: I can enter different values, but I cannot save the rule. The input field only accepts "ist/ist nicht". Switching to en_US makes no difference: only "is/is not" is available.
Ah, we have some hidden magic here. Perhaps should make it more obvious… anyway, the comparator changes to matches automatically, when you start your check with a slash ("/").
Entering a "/" at the beginning of the input field restricts the selection to "match/does not match" or the german "entspricht/entspricht nicht". But now the rule "if file created and file name matches /test.*.txt" switches the save button to "This configuration is invalid" (The given regular expression is invalid). Where can I find the allowed syntax?
Activity
blizzz commentedon Aug 31, 2020
select "matches" instead of "is", then you can use regex expressions. This is provided by the worklfowengine, part of Nextcloud server.
hj-beckers commentedon Aug 31, 2020
The only selection possible is (in the german version) "ist/ist nicht" translated "is/is not" ? I can enter a value, would I use "entspricht"? Can I find the german values somewhere in the source?
hj-beckers commentedon Aug 31, 2020
found apps/workflowengine/l10n/de_DE.js: "entspricht/entspricht nicht". But why do these values not show up in the dropdown menu? I'm using chromium Version 84.0.4147.135 (openSUSE Build) (64-Bit).
hj-beckers commentedon Aug 31, 2020
Further tests: I can enter different values, but I cannot save the rule. The input field only accepts "ist/ist nicht". Switching to en_US makes no difference: only "is/is not" is available.
blizzz commentedon Sep 1, 2020
Ah, we have some hidden magic here. Perhaps should make it more obvious… anyway, the comparator changes to matches automatically, when you start your check with a slash ("/").
hj-beckers commentedon Sep 1, 2020
Entering a "/" at the beginning of the input field restricts the selection to "match/does not match" or the german "entspricht/entspricht nicht". But now the rule "if file created and file name matches /test.*.txt" switches the save button to "This configuration is invalid" (The given regular expression is invalid). Where can I find the allowed syntax?
blizzz commentedon Sep 1, 2020
@hj-beckers the pattern has to be encapsulated in slashes. If you remove the leading slash, it switches back to is/is not.
hj-beckers commentedon Sep 1, 2020
It works. Thank you for the prompt reaction, Closing the "bug".