字符串如下
key: 5_53;E(g5g5rdd[w&Pygg As
需要正则匹配 key: 和 As 中间的,除了空格什么字符都有可能出现
求正则表达式
1
explon 2015-09-22 12:04:21 +08:00
按照空格分割成数组取 key: 与 As 之间的不就好了?
|
2
chuxuezhe OP 两头还有其他的单词
|
3
suduo1987 2015-09-22 12:19:53 +08:00 via iPhone
代码混淆?
|
4
aa45942 2015-09-22 13:39:28 +08:00
(?<=^key:).*(?=As$)
|
5
b821025551b 2015-09-22 14:10:11 +08:00
key:(.*)As
|
6
freedomSky 2015-09-22 14:28:23 +08:00
key: \([^ ]*\) As
|