Redis PSUBSCRIBE命令用于订阅频道匹配给定的模式。
语法
redis PSUBSCRIBE命令的基本语法如下所示:
redis 127.0.0.1:6379> PSUBSCRIBE CHANNEL_NAME_OR_PATTERN [PATTERN...]
下面列出了一些Redis的支持模式
- 
		h?llo匹配了hello, hallo和hxllo 
- 
		h*llo 匹配了hllo和heeeello 
- 
		h[ae]llo 匹配了 hello 和 hallo, 但不是hillo 
例子
redis 127.0.0.1:6379> PSUBSCRIBE mychannel Reading messages... (press Ctrl-C to quit) 1) "psubscribe" 2) "mychannel" 3) (integer) 1
						上一篇:
								
												下一篇:
								Redis环境安装配置
												
						
						
					
					
					