marklogic / marklogic/marklogic-contentpump

-output_uri_replace regex is nearly impossible to use

Open
#232 0 comments 0 reactions 1 assignee View on GitHub

@abika5 is already working on this.

Since Jul 14, 2022.

bug minor mlcp new
Dominant language
Java
Stars
37
Forks
32
Avg merge
1h 3m
Merged PRs (30d)
12

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.