Hello,
As the title says, my issue happens during the pipeline, locally the bash command works fine, but when the command is run on the pipeline, the regex becomes wrong.
Here is the command in question:
echo '(searchString === null || searchString === void 0 ? void 0 : searchString.length) > 0 && results && (results === null || results === void 0 ? void 0 : results.length) > 0 && setResults(fuseResults(searchString));' | sed -e 's/&& (results === null \|\| results === void 0 \? void 0 : results\.length) > 0//g'
The result locally is:
(searchString === null || searchString === void 0 ? void 0 : searchString.length) > 0 && results && setResults(fuseResults(searchString));
The result in the pipeline:
(searchString === null || searchString === void 0 ? void 0 : searchString.length) > 0 && results || results === void 0 ? void 0 : results.length) > 0 && setResults(fuseResults(searchString));
The issue must be in the special characters that are being escaped, but I can’t see how to fix it.
Thank you !