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

-output_uri_replace regex is nearly impossible to use #232

Open
mlzarathustra opened this issue Jul 14, 2022 · 0 comments
Open

-output_uri_replace regex is nearly impossible to use #232

mlzarathustra opened this issue Jul 14, 2022 · 0 comments
Assignees
Milestone

Comments

@mlzarathustra
Copy link

mlzarathustra commented Jul 14, 2022

After much frustration fussing, and a post to stack overflow, I finally found a syntax that would work:
"^.*(/[^/]+/),'$1'"

It turns out that you have to both wrap the whole thing in double quotes, and ALSO wrap the replacement string in single quotes. That's in a config file. I never got it working on the command line.

The error message is anything but helpful.

To me it looks like a bug, but in any case it should be documented properly, which it is not. A working example of regular expression replacement should be included in the documentation.

The above is a very simple expression that should be useful to discard everything up to the directory below, which is probably a very common use case. It shouldn't be so difficult to do that, and I shouldn't be forced to spell out the explicit path, as that solution is not portable.

Please see the stackoverflow issue for more details:
https://stackoverflow.com/questions/72946854/marklogic-mlcp-output-uri-replace-fail

@yunzvanessa yunzvanessa added this to the 11.0.0 milestone Jul 14, 2022
@yunzvanessa yunzvanessa modified the milestones: 11.0.0, 11.1.0 May 15, 2023
@abika5 abika5 modified the milestones: 11.1.0, 11.2.0 Jan 3, 2024
@abika5 abika5 modified the milestones: 11.3.0, 11.4.0 Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants