mysql - Parse returned value with Regexp on SQL query result -


following query returns form field tb2.

select  tb1.*, tb2.form    jj_books tb1         inner join jj_users tb2             on tb1.book_id = tb2.book_id group data_id 

form field contains delimeted data (text^book1^booktitle~text^book2^booktitle2~text^book3^booktitle3~...) , need retrieve 1 string (booktitle2) it.

is possible use preg_match (regexp) in query , how?

if third ^-delimited field in second --delimited field, use nested instances of substring_index(). lot simpler regexp. see https://dev.mysql.com/doc/refman/5.7/en/string-functions.html#function_substring-index


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -