我有一个像
这样的字符串"Email Request processed successfully Emails:[xyz.abc@qubee.com.bd][HostName
=WSRC-AFFILIATE-1, Host Address = 192.168.103.105]"
如何在mysql中获取"xyz.abc@qubee.com.bd"
答案 0 :(得分:1)
如果模式相同,则可以执行
mysql> select
substring_index(
substring_index('"Email Request processed successfully Emails:[xyz.abc@qubee.com.bd][HostName = WSRC-AFFILIATE-1, Host Address = 192.168.103.105]"',
'Emails:[',-1
),
']',1) as s ;
+----------------------+
| s |
+----------------------+
| xyz.abc@qubee.com.bd |
+----------------------+