Creating a card game. Best ways to interpret the various cards?

I’m working on a card game. There are 100 cards to start with and all of them do different things. The cards are design to have a trigger, an action and a target. Right now all the card data is in a database, which the game will load in at start. What is the best way to interpret the various cards? Right now I’ve created a way to write expressions, like (trigger) ? TRIGGER_TYPE @ TARGET_TYPE, (action) ACTION_TYPE, (target) ? TARGET_TYPE : TARGET_MODIFIER. It’s a simple syntax, though tedious to write expressions for each card, I have some ideas for simplification but I’m sitting here getting ready to research on how to read through a string with regex and interpret the cards but I can’t help but wonder if there is a better way to approach this task.

You have devised a tedious expression, which you don’t yet know how to read. Yes, there is a better way.

You need to convert the human-readable abilities of each card into a series of properties that can be understood by your game.
There is no need for you to stuff all the data into a text string and then extract it.

I assume your actual database has the trigger, action and target in separate columns in a table along with columns for the card name, text and art references etc. If not, it should. The game does not need to ‘read’ a card like a human would, it needs to be aware of its properties. You need to store the properties against the card reference. You then apply the properties to a game object when the card comes into play, along with additional properties such as which player controls it.

Each thing you have may actually be multiple properties - for your card’s TARGET_TYPE you probably need an additional property that specifies the quantity of targets it would apply to, and use a spare number like 0 to mean all. And then another property to specify whether this relates to all players, all opponents, the opponent of your choice etc.

It will be worth your while reading a detailed description of a card game that has triggers, actions and targets - such as
the official turn steps to Magic: The Gathering -
so you can begin to imagine what data you will need and at what points, even for a less complicated game.