Skip to content

NOT matching a pattern when filtering a list

Mark Croxton edited this page Jun 19, 2013 · 1 revision

Let's say you want to exclude any list row where the url_title field is the same as {segment_2}. Use a negative lookahead expression:

  {exp:stash:get_list name="news_items"
        match="#^(?!{segment_2}$).*$#"
        against="url_title"
        scope="site"}
        {title}
  {/exp:stash:get_list} 
Clone this wiki locally