Using `$` so that it only matches right side. I don't think there's ever going to be a valid cardname with `|` in it, but people have had issues with un-cards before so better to be as precise as possible using regex. `"\\|.*$"` should do it