I am trying to clean a string read from LOAD CSV using pattern matching.
The idea was to use the following query
RETURN apoc.text.replace('Aglianico Del Vulture DOC Serpara 2010 Re Manfredi !', '([\s\S]*?)(DOCG|DOP|DOC|IGP|IGT)/mig', '') AS output;
The expected result (tested on regex101) should be
Aglianico Del Vulture Serpara Re Manfredi
But the result from apoc is the same as input with absolutely no change.
Can someone explain and suggest a way to solve the problem?