-
Notifications
You must be signed in to change notification settings - Fork 116
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
Group dynamic collection: RegEx for 'owner' field returning empy and non-three-letters #398
Comments
I get the same result in JabRef 5.8. The reason seems to be disappearance of the |
"Searching for a keyword" has certain limitations which depend on the way fields are created and deleted in JabRef (e.g. empty fields "do not exist") and it could be that you just hit one of these bugs. "Free search expression" does have less limitations. Though, there are different versions of RegEx, so it could be that the bug also stems from using wrong RegEx syntax. JabRef uses a java based one from Oracle. Have a look at the JabRef documentation about advanced search or Oracles RegEx docs. In particular the following will be of interest to you:
I have a group with a similar line to search for entries without a group (Refs JabRef/jabref#7871): You could adapt this line to something like this:
and then add your other conditions to it. |
@CrocodileDandy 's expression combined with @ThiloteE 's suggestion works as intended, returning empy and non-three-letter owners. The
For empy fields, all you need is the first character; like this (either one):
|
Issue solved. Might be nice to put this into the RegEx documentation, therefore transferring this to the documentation repository. |
Reopened because this could be something for JabRef's documentation and webpage. @CrocodileDandy, if you don't want to receive further notifications, you can unsubscribe them for this specific issue. |
@ThiloteE Go ahead and add it to the documentation ;) |
JabRef version
Other (please describe below)
Operating system
Windows
Details on version and operating system
Windows 10 21H2, JabRef 5.1
Checked with the latest development build
Steps to reproduce the behaviour
I fail to find library entries where the
Owner
field is left empty using a dynamic group based on collection by a search for keywords and a regex.I have a shared library where every user is required to use the setting to mark new entries with their username (General > Entry owner > ☑ Mark new entries with owner name). I want to check this by gathering the entries where the
Owner
field is empty (or does not match the required pattern) in a dynamic group.For this purpose, I have created a dynamic group where entries are collected by searching for keywords in the
Owner
field using the following regex:^(?![a-zA-Z]{3}$)
. This regex will match if the content of the field is different from three letters, either lower or upper case. I checked it on https://regex101.com/Unfortunately, no entry is added to the group.
Is that normal behavior? What am I missing here?
To reproduce:
Owner
field filled with three letters only and some left empty or with a different content.Owner
field using the following regex:^(?![a-zA-Z]{3}$)
Appendix
...
Log File
The text was updated successfully, but these errors were encountered: