Forum Moderators: open
SELECT stuff FROM table WHERE foo REGEXP "bar"
.... produces this for me:-
bar:trillianjedi@192.168.192.140;uniq=61F8A8B.......
That's an excellent start, but what I'm really digging for here is that IP address : 192.168.192.140
Can I RegEx that bit out straight inside this query, or am I going to have to loop the resulting dataset and then reduce it down to the IP address programmatically?
Thanks!
TJ
Can you link me to the page you looked at?
All I could find was RegEx-ing for word match. We might be at cross purposes here - what I need is to RegEx the result not the search.
EG, instead of getting result (which is one field):-
bar:trillianjedi@192.168.192.140;uniq=61F8A8B.......
.... I want to get handed:-
192.168.192.140
I'll have another look through the manual....
TJ
(FWIW you can in PostgreSQL, which is one of the many reasons why I prefer it to MySQL).