TABLE OF CONTENTS


::pwtk::cardL2regexp

SYNOPSIS

proc ::pwtk::cardL2regexp {card_list} {

DESCRIPTION

Transform list-of-cards into a regexp for parsing the input, i.e. {CARD1 CARD2} is tranformed into (^CARD1|^CARD2)

If $card_list eq {}, empty string is returned

SOURCE

    if { [string trim $card_list] ne {} } {
        return "(^[join $card_list |^])"
    } else {
        return ""
    }
}