lremove — remove from a list elements matching one or more patterns


::rivet::lremove (-regexp | -glob | -exact) list pattern ?pattern? ?pattern?


lremove removes from list ?list? the first occurrence of an element matching one of the patterns listed in the command line. By specifying the -all option every occurrence of one the patterns is removed

Pattern matching can be -exact,-glob style or following regular expressions (-regexp). These options are globally valid across the whole pattern list (default is glob style matching)

::rivet::lremove -all -regexp {aa e111 bab aa} aa e111 bab
e111 bab
::rivet::lremove -all -regexp {aa e111 bab aa} aa "e\\d+"