-
Notifications
You must be signed in to change notification settings - Fork 19
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
Does the input field accept regular expressions? #58
Comments
select "matches" instead of "is", then you can use regex expressions. This is provided by the worklfowengine, part of Nextcloud server. |
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? |
@hj-beckers the pattern has to be encapsulated in slashes. If you remove the leading slash, it switches back to is/is not. |
It works. Thank you for the prompt reaction, Closing the "bug". |
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 text was updated successfully, but these errors were encountered: