Hope all is going well.
I wondered if you might be able to give me some advice re a feed filter and it’s use…I’m using “Search and Replace RegExp_v1” to scan a size field so I can capture and replace part of the field with a word.
The regex I’m using is: /((.*)(y|Y|YR|yrs|Years)(.*))/i
Replace value is: $2 years fix
The field (after import) contains a range of sizes in the format
10 Years/Long,10 Years/Short,11 Years/Long,11 Years/Short,12 Years/Short,14 Years/Long,15 Years/Long,16 years FIX2
The raw field data looks like:
10 Years/Long,10 Years/Short,11 Years/Long,11 Years/Short,12 Years/Short,14 Years/Long,15 Years/Long,16 Years/Short
I have noticed that the filter only seems to replace the last matched word in the feed data field (even when the match should match and replace the word multiple times). I use the same filter a lot for other purposes without issue. I’m not sure if I have the regex wrong (I don’t think I have) or if the filter won’t actually capture and replace a number of times within the same field or if it’s the commas used as separators or even the '/' in the field which are causing the issue.
I wondered if you might be able to suggest the reason the above isn’t working?
Thanks in advance.