View Single Post
Old 10-20-2021, 05:03 PM   #1
Hortensia
Enthusiast
Hortensia began at the beginning.
 
Posts: 30
Karma: 10
Join Date: Jul 2021
Device: Kindle Paperwhite, Kobo Libra 2
Search and Repace in comma separated list

Using Search and Replace, I am trying to clean up a custom column with pairings but I cannot manage to write the correct regex.

The input data is as follow: "A/B, C/D, E/F (mentioned), G/H (mentioned), I/J".
The objective is to remove the pairing(s) which are only mentionned. I would like the following output: "A/B, C/D, IJ".

I tried with this regex:
Code:
,([^&]+)/([^&]+)\s\(mentioned\)
However, the output is: "A/B, I/J".

How to write the regex so that commas are not included in the
Code:
([^&]+)
component?
Hortensia is offline   Reply With Quote