-
Notifications
You must be signed in to change notification settings - Fork 115
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
Key generator new field marker #525
Comments
I have not tried it, so the syntax could be wrong. Feel free to adapt.
Something like this?
Sources: |
I found a regex (
but still need one to match
|
Would this work?
Explanation:
|
@ThiloteE No, unfortunately not. |
Some (hopefully helpful) thoughts
I.e., If I managed to copy the regexp correctly |
I wanted to do some tests first and haven't had time yet, but i read (here: https://www.regular-expressions.info/unicode.html) that "Java 7 adds support for Unicode scripts. Unlike the other flavors, Java 7 requires the “Is” prefix." Jabref is built with/on JavaFX, so i assume it uses Java-based RegEx. Therefore replacing Edit: \p{Upper} seems only to be for ASCII uppercase letters. |
@k3KAW8Pnf7mkmdSMPHz27 Escaping the \ did the trick, thanks! I don't know of this is a common problem, but if so, it could be integrated into the application. Just if you think that is a useful feature to have... |
Maybe one of you can add a hint regarding the backslash and the Character class thing to the docs https://github.com/JabRef/user-documentation |
Added documentation according to [this issue](https://github.com/JabRef/jabref/issues/8371#issue-1090789648).
The more I think about it, couldn't it be solved with something like replacing |
Added documentation according to [this issue](https://github.com/JabRef/jabref/issues/8371#issue-1090789648).
@funnym0nk3y i tried some lookbehind, lookahead and other conditional (IF ELSE) constructs in linked file search, but i could not make it work (even though we know it works on regex 101. If i may ask, was it working for you in JabRef after all, and if yes, could you post the full solution here? |
@ThiloteE It did work for me with this exact regex: |
Note that I removed some escaspings JabRef/jabref#11967. Feels much cleaner now (at least for me ^^) |
Is your suggestion for improvement related to a problem? Please describe.
Some authors have double names separated by a whitespace or a hyphen which generates long citation keys. Truncating the keys after N characters leads to more or less cryptic keys.
Describe the solution you'd like
To have more natrual keys I'd like to have a key marker that truncates the authors last name after the first non-ASCII character. I tried achiving this through a regex but did not succeed.
The text was updated successfully, but these errors were encountered: