Bug with Regular Expression match in GKC

I’m trying to use a Regular Expression match (=~) in the Property Match field of a GKC, but it doesn’t seem to be working. A standard equality test (==) works fine, though. Not sure if I’m doing something wrong or if this is a bug.

The Regular Expression I was trying to use is DeckName=~"Lakes" .

Each of the 5 potential boards you can select for the module has a Deck named "Lakes " (we need a different deck for each board because the board graphics put it in a different spot on some boards). The pieces in the Lakes decks have a Send to Location that’s triggered from this GKC, and it simply doesn’t trigger when using the Regular Expression.

If I rename all 5 decks to simply be “Lakes”, and change the Property Match expression to DeckName=="Lakes" , it works fine. I can live with this, but it would be nice if the RE match actually worked.

If you need an example I’ll try to whip up a simple test module (the Terraforming Mars module is quite big and complicated).

Edit: This is with VASSAL 3.4.5.

That is doing exactly what it is supposed to. “Lakes” as a Regular expression will match exactly the text “Lakes” and nothing else. It certainly will not match “Lakes " or Lakes Deck2” or anything else.

I’m no RE expert, but you need something else on the end to match the characters after “Lakes”. Something like


D’oh! Don’t know what I was thinking there. You’re quite right. This is what I get for coding late at night. ;)