这里有一个字符串,格式如下:
Board: [Qd 6c Kc 8s Ad]
Player STACKS5143 does not show cards.Bets: 0.15. Collects: 0. Loses: 0.15.
Player REAGANBUSH84 does not show cards.Bets: 0.15. Collects: 0. Loses: 0.15.
Player HossaRules does not show cards.Bets: 0. Collects: 0. Wins: 0.
Player xrayoki does not show cards.Bets: 0. Collects: 0. Wins: 0.
Player sykoteekho shows: High card A [7c 9c]. Bets: 3.29. Collects: 0. Loses: 3.29.
*Player Autobot shows: One pair of Ks [Ks Jh]. Bets: 3.29. Collects: 6.54. Wins: 3.25.
Game ended at: 2018/2/19 15:59:26
我只想在单词show
之后找到括号内的数字
有办法吗?你知道吗
我在这里试过:(show.+ | \[.+\])
但它似乎在拾起我不想要的其他括号。你知道吗
有什么好主意吗
谢谢你
这里是:
将只匹配“7c 9c”和“Ks Jh”作为组“$1”。你知道吗
演示:here
只要玩家的用户名中不允许有方括号,它甚至应该与名字中有“show”作为子字符串的玩家一起工作。你知道吗
shows
作为关键字。你知道吗试试
shows.*?\[([^\[\]\r\n]*)\]
其中$1(组1)包含括号内容。你知道吗
相关问题 更多 >
编程相关推荐