我需要一个正则表达式来查找与以下格式匹配的任何字符串:'+‘或'-',后跟数字或字母,后跟冒号':’。"+2: Each player discards a card.creature dies, return it to the battlefield under your control at the beginning of the next end step.\&qu
我有这样一个正则表达式:"[a-z|A-Z|0-9]: ",它将匹配一个字母数字字符、冒号和空格。我想知道如何拆分字符串,但将字母数字字符保留在拆分的第一个结果中。我不能更改regex,因为在某些情况下,字符串将在冒号和空格之前具有特殊字符。Delicious :): I want to eat this again") # Result: ['Delicious :)