Skip to content
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

Add group modifiers (format) #811

Merged
merged 3 commits into from
Aug 29, 2024
Merged

Add group modifiers (format) #811

merged 3 commits into from
Aug 29, 2024

Conversation

nwagner84
Copy link
Member

@nwagner84 nwagner84 commented Aug 29, 2024

This PR adds the group modifiers U (uppercase), L (lowercase), W (remove white-spaces) and T (remove leading and trailing white-spaces). Modifiers must follow a single ? after the opening parenthesis. It's possible to combine multiple modifiers like (?WU ...) which transforms the result to uppercase and remove all white-space characters.

Example

$ pica select '[email protected], 006Y{ (?W "https://isni.org/isni/" 0) | S == "isni" }' goethe.dat
118540238,https://isni.org/isni/0000000120999104

@nwagner84 nwagner84 added C-enhancement Category: enhancement A-rust-api Area: The Rust API A-select Area: The select command labels Aug 29, 2024
@nwagner84 nwagner84 self-assigned this Aug 29, 2024
Signed-off-by: Nico Wagner <[email protected]>
Signed-off-by: Nico Wagner <[email protected]>
@nwagner84 nwagner84 changed the title Add group modifiers (lower, upper, trim) Add group modifiers Aug 29, 2024
@nwagner84 nwagner84 changed the title Add group modifiers Add group modifiers (format) Aug 29, 2024
@nwagner84 nwagner84 merged commit 5ae2a08 into main Aug 29, 2024
32 checks passed
@nwagner84 nwagner84 deleted the format-modifier branch August 29, 2024 11:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-rust-api Area: The Rust API A-select Area: The select command C-enhancement Category: enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant