I'm using Stash to set and retrieve a list based on channel entries. I want to filter the list by a 'column' of data defined by a pipe-delimited set of values.
I'm having trouble though getting the regex to work. So, for example I have the following data in my list:
4|4|4|4|2|2
2|2|2|2
9|9|9|2|2
2|2|2
9|9|9|2
2|6|3|4|5|9|6|7|2
I'm using the following regex:
{exp:stash:get_list name="paper" parse="inward" match="#^((.*2).*)$#" against="parents"}
But only two of the above are being returned in the list:
4|4|4|4|2|2
2|6|3|4|5|9|6|7|2
If I test this pattern on Regex Tester it returns all results as expected.
Any thoughts on why this might be happening or how better to achieve this (so returns all data with 2)? I've tried simpler regex patterns (eg #2#
or #2+#
) with no success.
Thanks
Cole